Commit Graph

653 Commits

Author SHA1 Message Date
jdolecek
d5f5129729 add one code style and one knote-related item 2006-11-05 09:40:26 +00:00
jmmv
e0fd5659c6 Bring in fix from FreeBSD by tjr, 3 years and 9 months ago: Store a
reference to the parent directory's vnode instead of its smbnode to
avoid a use-after-free bug causing a panic when a smbfs mount is
forcefully unmounted.

Keep trying to flush the vnode list for the mount while some are still
busy and we are making progress towards making them not busy.  This
stops attempts to unmount idle smbfs mounts failing with EBUSY.

The easiest way to reproduce the above problem, from what I have seen is:
1) Assume /s is a smbfs mount point.
2) mount /s
3) stat /s/foo/1
4) umount /s
   Returns error because the file system is busy.
5) Shutdown the machine: panic in smbfs_reclaim because vrele
   accesses already-released memory.
2006-11-02 17:34:21 +00:00
jmmv
51634dfd25 Make tmpfs_getpages behave as genfs_getpages by ignoring the input pages
array's contents and returning all the requested pages.  Otherwise there
are problems (accessing invalid memory) when the a_m vector is passed
uninitialized as the NFS server code does.  Fixes PR kern/34959.

Note that this is not a "real" fix.  While this makes tmpfs's getpages
operation consistent with the behavior of other file systems, it does
not resolve the different semantics between uvn_get and uao_get as
described in PR kern/32166.  I'm adding a comment in the code mentioning
exactly this so that it can be reviewed when this last problem is
addressed.
2006-11-02 15:35:25 +00:00
jmmv
71f9a07732 Update the file's ctime after a rename. Thanks to pooka@. 2006-10-30 15:23:20 +00:00
jmmv
da1dae4180 Grr... cvs diff scrolled too much and I didn't notice there were some
unwanted changes in this file.  Revert them; sorry.
2006-10-30 15:11:01 +00:00
jmmv
2185c98874 When renaming a file, we have to modify the mtime of the directory holding
it, not the mtime of the file itself.  This fixes the problems exposed when
unpacking software under a tmpfs and trying to build it because dependencies
were not calculated properly (e.g. autoconf 2.60 as reported by tls@).
2006-10-30 15:09:47 +00:00
pooka
eb6da7fc35 fix checkalias true branch: don't unlock or lock twice 2006-10-27 19:54:34 +00:00
pooka
0035113cf8 Use spec_fsync for specops vop_fsync: it knows about vflushbuf(), which
is more than what puffs currently knows.  makes e.g. ffs unmount for a
puffs-based device node work.
2006-10-27 19:01:48 +00:00
pooka
30a851c1d1 support fifos 2006-10-27 12:25:16 +00:00
pooka
0f94cb76f7 support specfs 2006-10-26 22:52:47 +00:00
pooka
93c897b7ab Fix operations creating new nodes to honor the vnode locking protocol
if the userspace server returns an error.  Fixes lockups if any
of the following operations failed: create, mknod, mkdir, symlink
2006-10-26 13:42:21 +00:00
pooka
f15702aabc debug print fixes 2006-10-26 13:35:23 +00:00
reinoud
dc5b5420b9 Revisit mnt_vnodelist TAILQ patch. Remove all suspicious TAILQ_FOREACH()
loops where vnodes can get removed or added during the loops. This could
lead to panic's on unmount since nodes are skipped or otherwise
TAILQ_NEXT(0xdeadbeef, ...) was dereferenced.
2006-10-25 22:01:54 +00:00
pooka
14d708398a pass VOP_INACTIVE() to userspace 2006-10-25 18:15:39 +00:00
pooka
a72d8a71e5 If the control descriptor is closed, mark userspace dead and wakeup
all waiters *before* trying to get the syncer lock necessary for
dounmount().  This prevents a deadlock if the userspace server dies
while the syncer is running.
2006-10-25 12:04:14 +00:00
drochner
21440e4fda minor fix to error handling (from OpenBSD, rev.1.40):
only set devvp->v_specmountpoint on successful mounts
2006-10-24 19:59:52 +00:00
pooka
4f1cd3b286 Apply a little eggwash to a deadlock condition where calling
getnewvnode() while holding on to any vnode lock deadlocks the
system if the file system is being forcibly unmounted.

Normal file systems don't trigger this problem because of two reaons:
1) they don't hold on to vnode locks while idling who-knows-where, so
   the race doesn't trigger
2) they aren't usually unmounted with FORCE; puffs is, in case "someone"
   manages to make a crashy userspace server

Nevertheless, a real solution is slowly being braised.
2006-10-23 23:32:57 +00:00
pooka
6ea08fd809 bump the reqstruct minsize to something more believable (but I should
really fix this, still)
2006-10-23 16:07:18 +00:00
pooka
e4ae558e9d fix print in VOP_PRINT
also make it compile on amd64.  problem noticed by Blair Sadewitz
on current-users
2006-10-23 12:21:39 +00:00
pooka
8640fbb580 kernel portion of puffs - the Pass-to-Userspace Framework File System.
It contains the VFS attachment and userspace message-passing interface.

This work was initially started and completed for Google SoC 2005
and tweaked to work a bit better in the past few weeks.  While
being far from complete, it is functional enough to be able and
stable to host a fairly general-purpose in-memory file system in
userspace.  Even so, puffs should be considered experimental and
no binary compatibility for interfaces or crash-freedom or zero
security implications should be relied upon just yet.

The GSoC project was mentored by William Studenmund and the final
review for the code was done by Christos.
2006-10-22 22:43:23 +00:00
reinoud
d31cd7fc58 Add extended attribute numbers associated with the two defined structures
for times and device specification.
2006-10-22 00:06:48 +00:00
reinoud
9c8aedbe6c Return the TAILQ_FOREACH to an explicit `for' loop since in the loop vnodes
can be removed.
2006-10-22 00:03:33 +00:00
reinoud
0ce809091d Replace the LIST structure mp->mnt_vnodelist to a TAILQ structure since all
vnodes were synced and processed backwards. This meant that the last
accessed node was processed first and the earlierst last.

An extra benefit is the removal of the ugly hack from the Berkly days on
LFS.

In the proces, i've also replaced the various variations hand written loops
by the TAILQ_FOREACH() macro's.
2006-10-20 18:58:12 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
chs
7ddbeb08d1 move includes only needed for kernel inside ifdef _KERNEL. 2006-10-06 02:40:58 +00:00
reinoud
14573dd3a8 Fix panic on unmounting VAT file systems. The VAT table was allocated and
freed on the wrong malloc type.
2006-10-04 13:03:17 +00:00
reinoud
21d692155a Fix memory leaks on mounting and dismounting UDF volumes. 2006-10-03 15:54:03 +00:00
christos
804dfaa036 Coverity CID 2960: Don't print NULL vnode (from Arnaud Lacombe) 2006-09-29 19:41:16 +00:00
christos
f89dbcf8f7 Coverity CID 2435: Add KASSERT before NULL deref (from Arnaud Lacombe) 2006-09-29 18:30:37 +00:00
reinoud
d9df4ed24c Add `vfs.udf.verbose' sysctl when running a DEBUG kernel to dynamically set
the udf_verbose variable. So when something goes wrong, it can be examined
on the spot without needing to reboot a new kernel and possibly loosing
state.
2006-09-29 01:36:28 +00:00
reinoud
695fa2b8b8 Fix lookup bug that could result in not finding the last entry. The check
for the cycling was too early. Also fix potential endless loop when the
last entry was deleted.
2006-09-28 19:57:26 +00:00
aymeric
a4a3d448f2 fix adosfs_readdir() so that we can list directories on AmigaOS filesystems.
. get rid of struct adirent which didn't match struct dirent anymore
. fix cookies, move all the code handling them to the end of the function

Includes many minor changes to the code of this function.
2006-09-23 22:47:11 +00:00
xtraeme
729d0a0184 Apply patch from PR kern/34583 sent by Rhialto, quoting him:
"Add a 3rd entry in the cache, which keeps the end position
 from just before extending a file.
 This has the desired effect of keeping the write speed constant."

And yes, that helps a lot copying large files... always at full speed
now. This closes my PR kern/30868 "Poor performance copying large files
on msdosfs".

Also remove a 2 if-statements testing the same condition, combine them.

All that from Rhialto, thank you very much.
2006-09-22 17:45:21 +00:00
reinoud
ce2c68fd18 Make VOP_LOOKUP's O(1) instead of O(n log(n)) giving a speedup of 7500% on
a 1400 file directory.
2006-09-19 23:59:16 +00:00
reinoud
4911612931 Fix serious file-corruption issue on sparable partitions. 2006-09-19 22:00:38 +00:00
reinoud
49ec3b4779 Fix panic when the sparable table didn't read in correctly. 2006-09-19 15:34:23 +00:00
christos
e15ade632a Avoid empty if. 2006-09-13 00:54:00 +00:00
reinoud
0f0ed58759 Fix copying too much space from a small buffer. The chances of it actually
happening are small but corrupt media could trigger it.
2006-09-05 22:30:52 +00:00
reinoud
6014bf8aa0 Fix locking scheme in udf_mount() to follow more the other filingsystems.
For yet unknown reasons passing the LOCKLEAF flag to namei() did return a
locked vnode as was meant but would panic when a raw device was passed.
2006-09-05 17:03:04 +00:00
christos
61f2f34223 add missing initializers 2006-09-03 21:29:37 +00:00
christos
2e139ee910 add missing initializers 2006-09-03 07:08:59 +00:00
christos
644f53e4e9 add missing initializers 2006-09-03 06:51:04 +00:00
christos
ce2bae8870 comment out empty code 2006-09-03 06:49:30 +00:00
christos
94de7229ef use c99 initializers 2006-09-03 06:48:26 +00:00
christos
9c03e39ea2 add missing initializer 2006-09-03 05:27:28 +00:00
christos
309d51fb22 add missing initializers 2006-09-03 04:56:33 +00:00
christos
88112b2ad5 add missing initializers 2006-09-02 07:30:30 +00:00
christos
66f851cf96 add missing initializers 2006-09-02 07:12:11 +00:00
reinoud
037fe176f0 Add shortcut for struct long_ad 's Unique ID hint that covers the lower 32
bits of the targeted files 64 bits Unique ID for recovery purposes.
2006-08-31 21:38:14 +00:00
christos
eef4aaba6b Fix getdirentries() issue from FreeBSD PR - 78953 Quoting from that:
If you perform this request on a directory with exactly 50 files
(plus '.' and '..' which brings the total to 52 objects), the first
reply for the SMB server completely satisfies the query (server
side is Windows 2000 Professional).

The smbfs client then performs a TRANS2_FIND_NEXT2 using the last
file name as the resume key.  The response returns a SearchCount
of zero (ctx->f_ecnt == 0) and an EndOfSearch code of zero.

Any attempt to get more entries with calls to TRANS2_FIND_NEXT2
result in Badfid (bad file descriptor).  I suspect the return of
SearchCount of zero means that end-of-search has been reached and
the Sid is now closed.

The solution is to set "SMB_RDD_EOF | SMB_RDD_NOCLOSE" after getting
back a zero SearchCount,  I've tested this in the field on a quite
a few systems, aggressively accessing Windows shares over smbfs
and it appears flawless.

I was initially concerned about the possibility of resource exhaustion
on the Windows server. I was afraid by not officially closing the
search, it would leave a resource hung-up and over time, exhaust
some sort of "open search table" limit.  I've since convinced myself
this is NOT the case.

Windows needs to be able to handle clients that come and go over
time.  If the search is not closed, Windows will close it if it
finds it needs more resources.  I've testing this on directory
searches descending into 10's of thousands of folders, with 100's
of thousands of files.
2006-08-28 15:56:56 +00:00
christos
e28a71d80a add missing initializers 2006-08-28 00:35:22 +00:00
christos
428665231e correct bogus loop test; used to be always true. 2006-08-28 00:28:51 +00:00
tsutsui
b5825ccf25 Change types from int8_t to char for arrays which store char names. 2006-08-26 14:04:55 +00:00
reinoud
5b2c16b797 Fix small though important errors in the Ecma-167 structure definitions. 2006-08-25 17:43:51 +00:00
reinoud
7915eb6468 Fix pool allocation/freeing problem for once and for all correctly. Since
it was initialised quite late due to its reliance on disc data the mount
process could have stopped before initialising and thus could panic again
only now for uninitialising an not initialised pool! *sigh*
2006-08-22 16:52:41 +00:00
reinoud
5223c4995c Make a better guess on VAT locations so discs that are semi-standard
formatted can be recognised. This also fixes the bug that prevented UDF to
mount an empty CD-R/DVD*R disc.
2006-08-21 23:52:19 +00:00
reinoud
445a215f26 Fix spurious panic when twice remounting a bad filingsystem. It then gets
the same memory block allocated as before and it bombs out on its
descriptor pool allready being initialised. It turns out that the pool was
not allways destroyed. This fix ought to clean it up whatever the cause of
the mishap that results in a reject.
2006-08-21 22:23:09 +00:00
gdt
7db024f8e7 When mounting an MSDOS fileysystem, do not require that bytes 252 and
253 of the superblock be zero.  Searching the net failed to find any
justification for checking these bytes; all available references say
that they are part of the boot code and not BOOTSIG2 and BOOTSIG3.

Modify the MSDOS 7.1 bootsector definition to have 420 bytes of boot
code and no BOOTSIG[23], rather than 418 bytes of boot code, to follow
available references and apparent Windows practice.  A test build
showed that these defines are not used other than in the check removed
by this commit.

Patch tested on netbsd-3, and enabled mounting of a 4 GB CF formatted
under Windows XP and then in a digital camera.  The CF was previously
unmountable.

Concept approved on tech-kern by christos@ and martin@.
2006-08-14 14:06:26 +00:00
reinoud
177a68d51b Fix comment; it stated a mimimum of 128 translations duh! a maximum it is! 2006-08-11 23:15:30 +00:00
reinoud
9e6b675112 Fix panic on badly or curruptly formatted discs due to an oddity in the
error handling chain.

If NetBSD 4.0 is allready branched at this time this ought to be pulled up.
2006-08-10 12:39:56 +00:00
reinoud
81e6c818c1 The local variable `index' seems shadowing an inbuild gcc variable (???)
when compiling from userland (kernel ok) so rename the variable to Index to
avoid the confusing warning.
2006-08-10 12:26:44 +00:00
ad
f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
martin
a3b5baed42 Fix alignement problems for fhandle_t, exposed by gcc4.1.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
2006-07-13 12:00:24 +00:00
reinoud
b1b70c855b Fixing a bad case of walking/writing out of allocated space.... the
allocated space was 2048 bytes, but when adding 1024 to the variable
`unix_name' to split the allocated space in half it effectively starts just
OUTSIDE the allocated space. This ought to fix memory corruption bugs when
using UDF.

This is a routine to revisit one day.
2006-07-09 13:58:47 +00:00
martin
6bfe6be406 Make it compile on 64 bit machines 2006-07-06 21:55:06 +00:00
martin
931985243c Redo previous differently - just use time_second.
Pointed out by Frank Kardel.
2006-07-01 10:12:36 +00:00
martin
c627e877cf Make it compile post time-counter merge 2006-07-01 08:42:39 +00:00
tron
a0d2802c69 Make this compile again. 2006-06-20 09:17:14 +00:00
christos
18b73e414c Don't allocate too much stuff on the stack. 2006-06-20 03:22:12 +00:00
christos
0c1391f078 remove ; from }; 2006-06-12 00:20:21 +00:00
christos
06595cb85e stack polics: Don't allocate 4K on the stack.
remove ; from };
2006-06-12 00:18:06 +00:00
kardel
de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
yamt
725fa55be5 hide more by ifdef _KERNEL. 2006-05-27 09:12:31 +00:00
yamt
fa971123c3 revive copyright notice for the code derived from libc/locale/utf2.c.
i've asked jdolecek@ about this, but got no reply.
2006-05-20 08:28:27 +00:00
yamt
ad696ab2dc don't try to dereference kauth_cred_t. 2006-05-15 12:51:21 +00:00
yamt
240883e159 include kauth.h for NOCRED. 2006-05-15 11:16:16 +00:00
christos
641b7ad824 More kauth fallout. 2006-05-15 01:29:02 +00:00
christos
fc6d984beb kauth fallout 2006-05-15 00:05:16 +00:00
elad
fc9422c9d9 integrate kauth. 2006-05-14 21:31:52 +00:00
he
355013fbd7 Don't use MALLOC_DECLARE() unless _KERNEL is defined.
Fixes build problem of usr.bin/fstat/ for vax.
2006-05-14 12:25:11 +00:00
mrg
e012cb30a7 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-11 01:12:21 +00:00
mrg
79652075f7 ntfs_runtovrun takes u_int8_t * not caddr_t 2006-05-11 01:11:11 +00:00
christos
93f1cb3704 Do the count check after we process getargs. 2006-04-28 19:17:45 +00:00
snj
d97db3840b s/allready/already/ 2006-04-25 02:19:31 +00:00
christos
5da80a50f2 Coverity CID 1138: Add KASSERT before deref. 2006-04-15 04:06:03 +00:00
christos
4a420185b2 Coverity CID 1197: Add KASSERT before deref. 2006-04-15 04:02:40 +00:00
christos
daeb76efcb Coverity CID 1135: Add KASSERT before deref. 2006-04-15 04:01:41 +00:00
christos
2ce6f7c5c6 Coverity CID 1093: Fix NULL deref. 2006-04-15 03:59:23 +00:00
christos
03372c0db6 Coverity CID 1001: Avoid NULL deref. 2006-04-15 03:56:25 +00:00
christos
9e36ae3b49 Coverity CID 839: Add KASSERT before deref. 2006-04-15 02:58:12 +00:00
christos
f16f3462cc Coverity CID 838: Add KASSERT before deref. 2006-04-15 02:56:51 +00:00
christos
be213d0c34 Coverity CID 2503: Remove bogus uninitialized deref. 2006-04-15 02:55:06 +00:00
christos
ceeda7c0ed Coverity CID 721: Add KASSERT since error != 0 conditions all returned, and
ifdef out dead code.
2006-04-15 02:53:49 +00:00
christos
9071fc0f28 Coverity CID 2508: Initialize variable 2006-04-15 02:44:16 +00:00
christos
56ef669e31 Coverity CID 2863: Check for NULL before freeing. 2006-04-15 02:42:08 +00:00
christos
41d5f0d550 Coveriry CID 733: Remove dead code. 2006-04-14 22:05:07 +00:00
christos
1c2c11fc00 Remove dead code. 2006-04-14 22:03:18 +00:00
christos
986cf947f1 Coverity CID 715: Remove dead code. 2006-04-14 22:00:14 +00:00
christos
5cf38f035b Strip the chrooted portion of the path from the reported pty path. Reported
and tested by Lasse Kliemann. Thanks!
2006-04-13 17:44:24 +00:00
xtraeme
0998485b9d make this build again (initiliaze ntmp). 2006-04-11 16:57:47 +00:00
christos
139332cff1 Coverity CID 2860: Free malloced resources on mount error. 2006-04-11 14:12:53 +00:00
riz
9f6ad5fff1 Swap the order of the tf_gen and tf_id members of struct tmpfs_fid,
since tf_id needs 8-byte alignment on some architectures (like amd64).
struct tmpfs_fid now fits in 16 bytes on amd64 again.
OK matt@
2006-03-31 20:27:49 +00:00
martin
625f1bbe61 Restrict generation numbers to 32bit values - we would have had to bump
_VFS_MAXFIDSZ to 24 otherwise for 64bit archs.
2006-03-26 20:18:58 +00:00
christos
f8912e4424 PR/32986: Kouichirou Hiratsuka: Don't proceed with unmounting the filesystem
if vflush failed. Thank to Jeff Ito for adopting a similar fix from FreeBSD.
2006-03-20 19:54:15 +00:00
christos
5a57baa413 don't use MALLOC with a non-constant size; use malloc instead. 2006-03-17 23:29:07 +00:00
christos
bd047b110f remove trailing newlines 2006-03-05 16:55:44 +00:00
yamt
ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
wiz
5d1e8b2745 Fix some typos. 2006-02-25 02:28:55 +00:00
thorpej
58853410ae Use device_class() instead of accessing dv_class directly. 2006-02-21 04:32:38 +00:00
christos
61315901b1 PR/31850: Geoff Wing: tmpfs does not honor sticky directories. 2006-02-21 03:19:45 +00:00
perry
fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
jmmv
064fbe7e18 Do not use unnamed structures/unions without instances; they break the
build under vax because of gcc 2.95.  Found by he@.
2006-02-16 14:57:50 +00:00
christos
6547cf74f3 make the include files usable from userland. 2006-02-10 16:00:02 +00:00
reinoud
979954f179 VND and harddiscs have their own defect free space management. 2006-02-04 23:21:43 +00:00
reinoud
8c7d758cbc Change a comment into a TODO and fix up case where we could return an
illegal allready-freed memory space.
2006-02-04 21:29:11 +00:00
christos
d3ef798d46 protect the whole file, not parts of it. 2006-02-02 21:58:40 +00:00
reinoud
6ee0cb5d5d Replace reinclude protection names with less generic versions. 2006-02-02 16:14:26 +00:00
reinoud
73bc73c9ad De __P() prototypes. 2006-02-02 15:57:35 +00:00
reinoud
14ab2cc9e6 Fix header re-inclusion protection defines to a less generic naming
scheme.
2006-02-02 15:52:23 +00:00
reinoud
aba87fd86c Fix $NetBSD$ tags. (sorry) 2006-02-02 15:38:35 +00:00
reinoud
09457a8a6e Initial import of a UDF file system implementation for NetBSD.
Finally the logic glue and the set distribution lists modifications.
2006-02-02 15:26:32 +00:00
reinoud
cff5e7ad2c Initial import of a UDF file system implementation for NetBSD.
The code supports read access to all media types that CD/DVD type drives
can recognize including DVD-RAM and BD- drives as well as harddisc partions
and vnd devices. UDF versions upto the latest 2.60 are to be supported
though due to lack of test media version 2.50 and 2.60 are not implemented
yet though easy to add. Both open and closed media are supported.

Write access is planned and in preparation. To facilitate this some hooks
are present in the code that are not strictly needed in a read-only
implementation but which allow writing to be added more easily.

Implemented and tested media types are CD-ROM, CD-R, CD-RW, CD-MRW,
DVD-ROM, DVD*R, DVD*RW, DVD+MRW but the same code can also read DVD-RAM,
HD-DVD and BluRay discs. Also vnd devices have been tested with several
sector sizes.

Discs created and written by UDFclient, Nero's InCD and Roxio's
DirectCD/Drag2Disc read fine.
2006-02-02 15:19:15 +00:00
jmmv
1aa1083c54 Cut a too long line introduced during the conversion to lwps. 2006-01-26 20:07:34 +00:00
tsutsui
7a10e95ea9 free() -> dealloc() for _STANDALONE. 2006-01-26 16:27:43 +00:00
christos
9c6e6ff8b2 Protect against uio_lwp being NULL from Pavel Cahyna 2006-01-14 23:49:59 +00:00
yamt
403fb83166 smbfs: use curlwp rather than uio->uio_lwp.
the latter is a garbage in the case of UIO_SYSSPACE.
PR/32499 from Juan RP.
2006-01-12 13:36:17 +00:00
wrstuden
160f564c51 Change union_unmount() to not play with the fs root vnode explicitly.
Let it get recycled along with all of the others. This is important
as if the root vnode has already been reclaimed, then we get a panic
when we try to vget it.

This addresses PR: kern/31382
2006-01-05 20:31:33 +00:00
tsutsui
1f5055228d Add preliminary support for System V Boot File System.
Written by UCHIYAMA Yasushi <uch@netbsd>.
2005-12-29 14:53:45 +00:00
chs
0545b6e0cb changes for making DIAGNOSTIC not change the kernel ABI:
- for structure fields that are conditionally present,
   make those fields always present.
 - for functions which are conditionally inline, make them never inline.
 - remove some other functions which are conditionally defined but
   don't actually do anything anymore.
 - make a lock-debugging function conditional on only LOCKDEBUG.

as discussed on tech-kern some time back.
2005-12-27 04:06:45 +00:00
perry
0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
jmmv
f37f56be99 Remove a conditional by always using inlined functions in favour of macros.
This way, the code is clearer and there shouldn't be any performance
difference (if the compiler DTRT).  Suggested by chs@.
2005-12-24 12:31:57 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt
1fa8bcda47 VFS_TO_TMPFS: remove a wrong assertion.
it's wrong because TMPFS_PAGES_MAX can be decreased.
2005-12-06 21:46:34 +00:00
christos
aa1c65555d protect against multiple inclusion instead of forbidding their access from
userland, and #ifdef _KERNEL all their kernel functions.
2005-12-03 22:16:16 +00:00
christos
4bffed72de - protect userland exported files against multiple inclusion.
- make sure that kernel only files don't compile in userland using #error
- XXX: some kernel only files still get installed.
- XXX: some files used in userland, don't get installed.
2005-12-03 17:34:43 +00:00
yamt
221616873d merge yamt-readahead branch. 2005-11-29 22:52:02 +00:00
dan
3a01b7a8ba take into account memory used for file cache pages, and wired pages,
when calculating potential free space
2005-11-28 22:28:36 +00:00
dan
cbba09ed4d simplify calculation of free swap space using uvm-exported statistics,
with thanks to yamt@ for useful hints.
2005-11-28 22:06:20 +00:00
yamt
6a17dd42f4 - ignore truncation for VCHR/VBLK/VFIFO as it used to be
before yamt-vop merge.  PR/32049 from Atsushi Onoe.
- reject setattr which attempts to change size of VLNK/VSOCK.
2005-11-11 15:50:57 +00:00
yamt
807ce4c6fc tmpfs_reg_resize: drop swap slots on truncation.
fix a problem pointed by jmmv@.
2005-11-08 23:04:03 +00:00
christos
fe1de4d6e3 PR/32003: Brian Buhrow: msdosfs doesn't properly zero out high cluster data
on non-FAT32 msdos filesystems.
2005-11-04 21:04:20 +00:00
yamt
a748ea88dd merge yamt-vop branch. remove following VOPs.
VOP_BLKATOFF
	VOP_VALLOC
	VOP_BALLOC
	VOP_REALLOCBLKS
	VOP_VFREE
	VOP_TRUNCATE
	VOP_UPDATE
2005-11-02 12:38:58 +00:00
dyoung
ba91bb71cf Bug fix: correct the sense of an if-condition in tmpfs_spec_close:
because VOP_UPDATE() usually succeeded, spec_close() was not usually
called.  Only skip the spec_close() step if VOP_UPDATE() returns
an error result.  Now /dev/watchdog works as expected when /dev/
is a tmpfs; previously, it was impossible to disarm a user-tickled
watchdog.
2005-11-02 05:41:50 +00:00
dyoung
b441f8100f Bug fix: change tmpfs_spec_bwrite from tmpfs_bwrite to vn_bwrite,
per yamt's suggestion.  Previously, if /dev/ was mounted on a tmpfs,
block device buffers were never flushed to disk.  Trying to unmount
a dirty filesystem (umount /dev/wd0e, say) caused an endless stream
of vflushbuf warnings, because tmpfs_bwrite was not flushing buffers.
The fix told to me by yamt solves the problem.
2005-11-02 05:39:16 +00:00
christos
f229ea7f53 make debugging code compile after 64 bit inode changes. 2005-10-23 04:28:53 +00:00
simonb
30ab8089df Update the mod and access times directly from ptyfs_read() and
ptyfs_write() rather than setting a flag and updating these times
through ptyfs_itimes() at some indeterminate time in the future.
However, just use the "time" variable to set the times instead of
using a potentially expensive call to nanotime().  A HZ resolution
on these timestamps is more than enough.

(Possibly incomplete) fix for PR kern/31430.
OK'd be christos@.
2005-10-12 15:23:33 +00:00
jmmv
ab7e099bbc Follow symlinks during lookup (i.e., don't stop too early) so that symlinks
to directories work as expected.  Diagnosed by Greg Oster.
2005-10-03 19:36:42 +00:00
christos
39e9173002 use a counter to prevent from mounting ptyfs twice. Using save_ptm is not
good enough, because if we don't have COMPAT_BSDPTY, then it will stay NULL.
2005-10-01 05:30:12 +00:00
jmmv
38c8dceb4b Explicitly initialize the tn_lockf field. I expect problems in some
situations otherwise...
2005-09-30 14:29:19 +00:00
dyoung
3d52cdeb53 In cd9660_mount, initialize imp to VFSTOISOFS(mp) instead of NULL.
Remove redundant assignments to imp.  This fixes the page fault
panic when the kernel mounts an ISO9660 filesystem, introduced at
revision 1.27.
2005-09-30 08:15:46 +00:00
jmmv
b6d141c71c Implement the tmpfs_advlock operation. Makes "user-level" file locking
work (aka lockf(3)).
2005-09-29 19:48:21 +00:00
christos
3888bec411 Move the duplicate mount check sooner, and fix a leak. 2005-09-29 14:45:56 +00:00
yamt
5ce7d98710 tmpfs_getattr: return up-to-date timestamps. 2005-09-28 23:42:14 +00:00
jmmv
24d12cb7e6 Some style fixes in comments. 2005-09-27 20:35:33 +00:00
jmmv
90260ab291 Handle too big numbers given in the max size argument. 2005-09-26 09:50:08 +00:00
yamt
58e607b974 tmpfs_rename: fix lock/unlock mismatch. 2005-09-26 00:46:59 +00:00
jmmv
9ba32cead7 Follow compat naming tradition: rename compat_export_args to export_args30. 2005-09-25 21:17:05 +00:00
jmmv
c690718c37 Only consider valid flags in the root mode's parameter given by the user.
I doubt the unchecked value could bring us problems, but better to be safe
than sorry.
2005-09-25 16:34:42 +00:00
jmmv
b35a89f13c Sanity check negative values in the maximum size and number of nodes
arguments to avoid a crash while mounting a tmpfs file system.  Add a
regression test for this too.  Noticed by chs@.
2005-09-25 16:28:43 +00:00
jmmv
e230b755b3 Synchronize NFS status with reality. After yamt@ changes (I think with the
implementation of getpages and putpages and the use of UBC in the read and
write operations), the worst problem has gone away which was a panic when
a file's contents were modified in the original file system and then read
through the NFS mount point.

Also remove the entry about optimization.  While tmpfs still has room for
improvement, it has become a lot better lately, thanks to the string pools
and the changes yamt@ did in the anonymous objects handling.
2005-09-23 21:39:29 +00:00
wiz
c31c860ef5 Fix typo, add missing parenthesis. 2005-09-23 20:46:18 +00:00
jmmv
b0085cab71 Kill the tmpfs(9) manual page; it was just documenting internal details of
tmpfs' "API" and was already rotting.

Instead, merge all the relevant comments into the code.  This includes
acknowledgements to Google's Summer of Code 2005 program (they were in the
AUTHORS section of tmpfs(9) before), so all the files need to be changed
to include this sentence alongside the title.  (Note that this was not a
requirement of the program.)
2005-09-23 15:36:15 +00:00
jmmv
f63b58d19d Lock the source directory during the rename operation so that we are safe
to modify it (I hope this is the correct way to go).  Avoids triggering an
assertion in the tmpfs_dir_detach function, shown by the t_rename
regression test.
2005-09-23 14:27:55 +00:00
jmmv
8d09f0278b Start inode numbers on 2 to mimic UFS tradition (and to avoid problems if
some utility relies on this).
2005-09-23 13:59:16 +00:00
jmmv
2a3e5eeb7c Apply the NFS exports list rototill patch:
- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
  function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
  file sys/nfs/nfs_export.c.  The former was becoming large and its code
  is always compiled, regardless of the build options.  Using the latter,
  the code is only compiled in when NFSSERVER is enabled.  While doing this,
  also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
  path and a set of export entries.  At the moment it can only clear the
  exports list or append entries, one by one, but it is done in a way that
  allows setting the whole set of entries atomically in the future (see the
  comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
  that it becomes file system agnostic.  In fact, all this whole thing was
  done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
  exports initialization; done internally by the kernel when initializing
  the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
  subsystems can run arbitrary code upon receipt of specific VFS events.
  At the moment, this only provides support for unmount and is used to
  destroy NFS exports lists from the file systems being unmounted, though it
  has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
2005-09-23 12:10:31 +00:00
yamt
bea9347034 fix buffer overrun for symbolic links. PR/31325. 2005-09-17 10:28:26 +00:00
yamt
db59142cb3 tmpfs_dir_getdotdotdent: correct fileid. 2005-09-16 00:18:48 +00:00
yamt
8e6209cffb change the way to handle directory "offsets" so that
they won't be changed when removing entries in the directory.
some applications like cvs rely on this.
2005-09-15 12:34:35 +00:00
yamt
20bb9654a2 tmpfs_getpages: don't create pages past eof. 2005-09-14 20:27:26 +00:00
soda
a74b7aeaeb mention what is the failure case, from FreeBSD revision 1.46 cvs log 2005-09-14 15:13:19 +00:00
christos
fe968d1756 PR/31312: Juan RP: Don't use negative cacheing on msdosfs, because of the
evil case preserving and case sensitive semantics. From FreeBSD.
2005-09-14 15:07:22 +00:00
yamt
7720dda14a tmpfs_read: handle requests past EOF. 2005-09-14 10:40:49 +00:00
jmmv
2ddaf8b92b Nodes cannot use the '0' identifier or they will be skipped by readdir.
E.g., the root node's '.' and '..' directory entries did not appear in
a directory list, because the root node always holds the first id.
2005-09-13 21:30:52 +00:00
jmmv
5f4b660e4e Adapt recent changes to the style of the rest of the file. 2005-09-13 20:02:05 +00:00
yamt
647aa77538 - don't waste/leak kva.
- implement getpages/putpages.  support mmap.
- eliminate meaningless memcpy.
- ubcify.
2005-09-13 14:29:18 +00:00
yamt
a7ca1cc6ef tmpfs_read: return EISDIR rather than EINVAL for non-VREG files.
XXX should we follow nfs, which uses EPERM?
2005-09-13 14:27:29 +00:00
yamt
1873c5428a tmpfs_link: always free pnbuf. 2005-09-13 12:11:27 +00:00
yamt
db9ffe1576 - don't keep a reference to a variable on stack.
- remove a meaningless assumption about the order of structure members.
2005-09-12 19:56:58 +00:00
yamt
ffb84f0f1b fix lock/unlock mismatch. XXX this is not a real fix. 2005-09-12 19:55:22 +00:00
christos
b9c29c4def convert to use it nanotime, but don't call it unless it is necessary. 2005-09-12 16:55:01 +00:00
christos
54705baa2e wrong variable name. 2005-09-12 16:54:35 +00:00
christos
c7d2653a66 use nanotime(). 2005-09-12 16:44:29 +00:00
christos
370f05b81d don't play with ctime directly anymore. 2005-09-12 16:43:38 +00:00
christos
1114655b16 Fix the CHANGE part too. 2005-09-12 16:42:09 +00:00
christos
ce573378a6 propagate itime changes from the other filesystems. 2005-09-12 16:37:13 +00:00
christos
a12024da06 Use nanotime() to update the time fields in filesystems. Convert the code
from macros to real functions. Original patch and review from chuq.
Note: ext2fs only keeps seconds in the on-disk inode, and msdosfs does not
have enough precision for all fields, so this is not very useful for those
two.
2005-09-12 16:24:41 +00:00
jmmv
7164c6807f Remove tmpfs from here, as it doesn't have a Makefile (dunno if it is
needed, yet).  Pointed out by FUKAUMI Naoki in private mail.
2005-09-12 09:11:20 +00:00
jmmv
8e0a777ab1 wiz@ remembers that the preferred way to spell file-system in NetBSD is
file system.
2005-09-10 22:28:57 +00:00
jmmv
ec93365612 Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program.  This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*.  Therefore, it is disabled by
default in all kernels.  However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
2005-09-10 19:20:48 +00:00
christos
7b1ec62c27 Make fileno calculations use ino_t variables. 2005-09-10 18:35:56 +00:00
christos
a4b3d5864b PR/23773: Tero Kivinen: Cannot mount msdos filesystems if filesystem size >
128GB
PR/31287: Fabien Devaux: msdosfs now can mount >128MB filesystems
2005-09-10 17:33:45 +00:00
xtraeme
85d3711504 Remove an extra ')' 2005-08-30 19:15:11 +00:00
xtraeme
37ed0ed9df Remove __P() 2005-08-30 19:11:43 +00:00
xtraeme
08fcacf4ed Remove __P() 2005-08-30 19:01:29 +00:00
xtraeme
85be4ce6e8 Remove __P() 2005-08-30 18:47:19 +00:00
xtraeme
47216f8470 Remove __P() 2005-08-29 23:57:35 +00:00
xtraeme
529eaccb6b The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, so
don't bother trying to write files bigger than this.  Just return
EFBIG to caller, rather than panic()ing later.

From OpenBSD.

This closes my PR kern/30864: "panic when copying files of >4GB on msdosfs"
2005-08-29 23:22:05 +00:00
nakayama
d8c6d7b24e statvfs(2) returns bogus result from union mounted file systems with
`-r' option, since it uses uninitialized buffer in the case of no
lower-layer file system.

So, add M_ZERO to malloc(9) flags to initialize the buffer.
2005-08-24 15:21:28 +00:00
christos
5e6a1c8476 fileid is now a quad. 2005-08-19 12:24:54 +00:00
christos
2ebf2b2fc3 namlen is u_int16_t now. 2005-08-19 04:47:55 +00:00
christos
b02ca699ef Add an _ to DIRENT_SIZE 2005-08-19 04:45:47 +00:00
christos
103542d3d7 fix a printf arg. 2005-08-19 04:15:02 +00:00
christos
758a209d23 64 bit inode changes. 2005-08-19 02:03:49 +00:00
jmmv
db4c002235 Fix comment regarding sbp->f_favail (which was a duplicate due to a pasto). 2005-08-05 13:24:18 +00:00
jmmv
e062fbf94f Let this build when MSDOSFS_DEBUG is defined (v_id disappeared a long time
ago but it was still used here).
2005-08-05 11:00:31 +00:00
christos
aa112c89a9 PR/30823: Dave Huang: Panic reading files larger than 4GB on NTFS 2005-07-25 00:48:22 +00:00
yamt
b7bfe82866 update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.
2005-07-23 12:18:41 +00:00
yamt
44d128fa8e - constify genfs_ops.
- use member designators.
2005-06-28 09:30:37 +00:00
thorpej
e871a0392f Remove the last references to M_NAMEI; everything should be using PNBUF_*()
now (for a long time now).  Remove M_NAMEI, and bump the kernel version to
3.99.7 to reflect its removal.
2005-06-23 17:00:30 +00:00
junyoung
6a5baa993c ANSIfy and de-__P. 2005-06-22 17:34:30 +00:00
atatat
df13e3579e Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone.  Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.
2005-06-20 02:49:18 +00:00
christos
a29d4b2515 - rename variables to avoid shadowing.
- add a few const.
2005-05-29 21:00:29 +00:00
christos
44e14add76 Don't print 0x in front of %p. From FreeBSD/OpenBSD 2005-05-22 15:29:33 +00:00
christos
362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
christos
cd80d2a69d Remove compat code that hard-codes default group and mode for pty creation.
Hi Matt!
2005-05-11 17:38:54 +00:00
thorpej
e633e8b61b - Define a VFS_ATTACH() macro that places a reference to a vfsops structure
into the "vfsops" link set.
- Use VFS_ATTACH() where vfsops are declared for individual file systems.
- In vfsinit(), traverse the "vfsops" link set, rather than vfs_list_initial[].
2005-03-29 02:41:05 +00:00
perry
477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
jdolecek
28302c221e use MIN()/MAX() rather than min()/max(), to avoid possible truncation
of 64bit values to 'int'
2005-02-13 11:57:47 +00:00
jdolecek
877dee10ba read always single cluster of data, to avoid confusing the buffer
cache; this appears to fix the random file content corruption which
happens when more than one cluster is read at the same time, i.e. for
files > 3*cluster_size

Fixes PR kern/23835

change obtained from FreeBSD ntfs_subr.c rev. 1.31
2005-02-13 11:55:40 +00:00
chs
8975a0856f adjust the UBC mapping code to support non-vnode uvm_objects.
this means we can no longer look at the vnode size to determine how many
pages to request in a fault, which is good since for NFS the size can change
out from under us on the server anyway.  there's also a new flag UBC_UNMAP
for ubc_release(), so that the file system code can make the decision about
whether to cache mappings for files being used as executables.
2005-01-09 16:42:43 +00:00
mycroft
e72fc6717e Whoops -- move the location of the VOP_OPEN()/VOP_CLOSE(), et al, from
foo_mountfs() to foo_mount(), to match the new mountroot API.
Also, for ext2fs and lfs, copy some restructuring from ffs to allow changing
file system parameters without specifying the device name.
(ntfs could use some more work.)
2005-01-09 09:27:17 +00:00
mycroft
0461b30ac3 Rework the mountroot interface so that vfs_mountroot() opens the root device
and just passes it on to the file system functions.  This avoids opening and
closing the device several times.

Mentioned on tech-kern some time ago, IIRC.  I've been running this for a
long time.
2005-01-09 03:11:48 +00:00
christos
603eb38ad9 make this compile again; hi potr 2005-01-02 21:15:48 +00:00
thorpej
1c95472d01 Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.
2005-01-02 16:08:28 +00:00
jdolecek
477f876cd6 size_t police
pointed out by Jesse Off on source-changes@
2004-12-28 01:12:26 +00:00
jdolecek
52c7db3883 change wget_utf8() to not require NUL-terminated string as input,
and adjust callers appropriately. cn_nameptr isn't NUL-terminated
for non-leaf components, so it's incorrect to assume it is always
NUL-terminated.

This fixes previous utf8-ization changes to not panic for cases
like 'echo */*/*.ps' in case the intermediate path components
are not in cache (yet).
2004-12-27 18:47:16 +00:00
jdolecek
2ce9f4516f change wget_utf8() to not require NUL-terminated string as input (added
'size' parameter), and adjust callers appropriately
2004-12-27 18:14:36 +00:00
christos
7c9f4b5736 I don't think that the vgone() in vop_inactive is needed; in fact it might
be the source of my deadlocks.
2004-12-18 05:26:41 +00:00
atatat
c64e485f42 Reorder ptyfs pseudo inode numbers so that 0 and 1 are unused, 2 is
the root of the file system, and slaves and masters alternate starting
at 3.  This means the inode numbers won't be really large until you
really allocate a really lot of ptys.
2004-12-16 05:30:18 +00:00
martin
5b98d0afc6 Declare functions with the proper type they return. While there, replace
some strange type names with their C99 equivalent.
This avoids sign extension of 32bit fields (like the file size) on 64bit
archs.
Based on a patch supplied by Olaf 'Rhialto' Seibert in PR kern/28471;
should fix that PR.
2004-11-30 21:36:28 +00:00
atatat
f9bdf3cd08 Remove the digits() function and simply set va_bytes and va_size to
zero in ptyfs_getattr().  There's no reason to make them something
else and no other devices (except for disk devices) report anything
other than zero here, so why should we be different?
2004-11-29 13:55:59 +00:00
christos
051b79b0c3 Add pty group and mode settings. 2004-11-25 05:15:10 +00:00
atatat
e7eaf9a12d Properly set va_fsid so that st_dev ends up correct. 2004-11-25 03:46:50 +00:00
jdolecek
3b4a395d32 when Joliet extension is in use, encode the Joliet Unicode file names
into UTF-8, rather than filtering them to ISO-8859-1 subset

provide vfs.cd9660.utf8_joliet sysctl to switch to the former
iso-8859-1-only handling, default is to UTF-8 encode
2004-11-21 21:49:08 +00:00
jdolecek
a38a5c8c2b switch to use new utf8 routines in <fs/unicode.h> 2004-11-21 16:29:57 +00:00
jdolecek
5467830039 routines to encode/decode Unicode in UTF-8; based on ntfs/ntfs_conv.c,
but modified to be slightly more forgiving for invalid sequencies, and
to gracefully handle end of string in middle of decoded sequence
2004-11-21 16:28:40 +00:00
jdolecek
b267d4ace5 whitespace cleanup 2004-11-20 19:56:44 +00:00
atatat
6c33fa80f0 Don't call ptyfs_time() with stack garbage. It makes the times look
funny.  I was getting stuff somewhere around 1939, but that's where my
kernel is.
2004-11-19 04:42:45 +00:00
jdolecek
b1dec5cb21 fix comment (s,basesrc,src,) 2004-11-15 17:18:12 +00:00
jdolecek
9d12d591c6 update #include path to fs/ptyfs/ 2004-11-11 19:19:59 +00:00
jdolecek
156a03ce12 move ptyfs off sys/miscfs/ptyfs/ to sys/fs/ptyfs/ 2004-11-11 18:56:25 +00:00
peter
76767beb4a Use DENYNONE to give unixy semantics of permitting everything not forbidden
by permissions.  Ie denial is up to server with clients/openers needing to use
advisory locks for further control.  From FreeBSD.

Fixes file access problem when the file is already open on the server.
Problem reported by George Abdelmalik <gabdelmalik at avdat dot com dot au>

Reviewed by jdolecek.
2004-10-27 19:17:13 +00:00
skrll
f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
jdolecek
80a2cb5245 rename 'sp' variable to 'ap' in adosfs_pathconf(), so that it matches other
filesystems and avoid silly pastos
2004-09-14 16:59:40 +00:00
skrll
d8390279f9 Fix typos/pastos. 2004-09-14 10:58:45 +00:00
jdolecek
caffd8ef28 set mp->mnt_stat.f_namemax on filesystem mount for use by statvfs, and use
the value for also pathconf(_PC_NAME_MAX) to keep the two in sync
2004-09-13 19:25:48 +00:00
mycroft
45a21b76f0 Fixing age old cruft:
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
  d_type fields(!), add a new internal flag, IMNT_DTYPE.

Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
  in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
  FS-specific checks littered throughout the code.  This may be used later to
  make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
  to implementation issues.

Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86

Clean up some crappy pointer frobnication.
2004-08-15 07:19:54 +00:00
pk
a7c40722d8 Call inittodr() from main(). Let file system code set the recorded `last
update' time (if any) through the new function setrootfstime().
2004-07-05 07:28:45 +00:00
hannken
f59f039ea5 Keep a pointer to the leaf mount. Needed for write gating where a
file system gets suspended and has layered mounts above it.

Welcome to 2.0G

Reviewed by: Bill Studenmund <wrstuden@netbsd.org>
2004-07-01 10:03:29 +00:00
christos
aa30b4a3db cleanup casts in get/set u short/long so that we don't have const castaways. 2004-06-30 03:43:14 +00:00