Commit Graph

53 Commits

Author SHA1 Message Date
dbj fe7c786886 add mnt_iflag field to struct mount for internal flags
mv MNT_GONE, MNT_UNMOUNT and MNT_WANTRDWR to this field
additonally add mnt_writeopcountupper and mnt_writeopcountlower fields
in preparation for pending write suspension support work
bump kernel version to 1.6ZD
2003-10-14 14:02:56 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
bouyer 75208caf18 Adapt for struct proc* -> struct lwp* changes. 2003-06-28 22:53:35 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
christos d864ba0136 fix lkm malloc lossage. 2003-04-22 17:14:12 +00:00
christos db7b52084a choose the smaller size of the two strings when memcpy'ing them. A better
fix would be to strncpy and null terminate? From enami.
2003-04-22 13:18:52 +00:00
christos 80ecd573c0 PR/1796: John Kohl: statfs misbehaves under chrooted environments.
- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.
2003-04-16 21:44:18 +00:00
fvdl 42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
thorpej b78f59b443 Merge the nathanw_sa branch. 2003-01-18 08:51:40 +00:00
chs ea6ddab6a8 the work-around in rev. 1.37 (turn off async) wasn't enough to prevent
hangs under heavy load.  so we now apply the more extreme version:
make MFS mounts "sync".  fixes PRs 17128 and 17321.
2002-10-24 16:41:00 +00:00
christos 6f3945a88d MNT_GETARGS support 2002-09-21 18:10:34 +00:00
hannken 7de36862a8 Rename bufq_init() to bufq_alloc().
Add bufq_free() to remove a buffer queue.
Avoid MALLOC while holding a spinlock.

From Chuck Silvers.
2002-07-21 15:32:17 +00:00
hannken d4c062b4cc Convert to new device buffer queue interface. 2002-07-19 16:26:01 +00:00
simonb 9a942a34e0 Don't use local extern declarations for the mountroot variable or
declare local prototypes for nfs_mountroot() or md_root_setconf().
2002-03-04 02:25:21 +00:00
chs eecf9e208a fix PR 15299 by making MFS filesystems not be "async".
in the longer term, MFS needs to be made a lot more VM-friendly.
2002-02-03 03:51:57 +00:00
lukem ec6245465a add RCSID 2001-11-08 02:39:06 +00:00
chs adf5d360a7 add a new VFS op, vfs_reinit, which is called when desiredvnodes is
adjusted via sysctl.  file systems that have hash tables which are
sized based on the value of this variable now resize those hash tables
using the new value.  the max number of FFS softdeps is also recalculated.

convert various file systems to use the <sys/queue.h> macros for
their hash tables.
2001-09-15 16:12:54 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
thorpej 5b35dc8136 When unmounting a file system, acquire the syncer_lock before
vfs_busy'ing just before the dounmount() call.  This is to avoid
sleeping with the mountlist_slock held -- but we must acquire
syncer_lock before vfs_busy because the syncer itself uses
syncer_lock -> vfs_busy locking order.
2001-04-16 22:41:09 +00:00
cgd 4dddddfe62 fix bug (pointed out as sequence point violation warning with current-ish gcc)
caused by use of makedev(major,minor++).  makedev() now (since 32-bit
dev_t conversion) evaluates its second argument twice.
2001-02-24 00:05:22 +00:00
jdolecek d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +00:00
simonb ec25ea9f3b Position comment correctly wrt last commit. 2000-10-13 17:59:11 +00:00
simonb 831fce13ac In mfs_start(), move the handling of outstanding I/O requests to before
the check for unmounting the filesystem.

Appears to fix kern/10122 from Hitoshi Matsunawa.
2000-10-13 16:53:53 +00:00
thorpej 5026e056e2 Back out previous change; there is something Seriously Wrong. 2000-05-19 20:42:20 +00:00
thorpej dd494c1a6c Redo the way MFS does I/O to the server's address space. Instead of
queueing up buffers and awakening the MFS server process to do the I/O,
we do the I/O to the server process's address space directly using
facilities provided by UVM.

This makes it possible for buffers attempting to flush out while the
MFS is being unmounted to actually do the I/O, where before it would
fail if the server process wasn't in the MFS idle loop (i.e. had been
signaled and was attempting to exit).

Should fix kern/10122 (I can no longer reproduce the problem described
in the PR when running with these changes), and any number of other
MFS-related complaints made by people over time.
2000-05-16 17:20:23 +00:00
thorpej 6d7f14dc5d Record the proc directly, not the pid, of the MFS server process,
and nuke the spare fields in the mfsnode.
2000-05-16 00:24:08 +00:00
augustss 169ac5b3c1 Remove register declarations. 2000-03-30 12:41:09 +00:00
simonb bd11640b2c Remove redundant decl of rootvp - it's in <sys/systm.h>. 2000-03-29 04:03:08 +00:00
jdolecek 03efc0b2b7 Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading.

For each leaf filesystem, add appropriate vfs_done routine.

Also remember how many times ffs_init() was called and do
the appropriate initialization on first call only. In ffs_done(),
destroy the resources when called by the last user of ffs code.
Change mfs to call ffs_init()/ffs_done() appropriately.
2000-03-16 18:20:06 +00:00
thorpej 0b0aecffd6 Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:43:10 +00:00
wrstuden 976aedb7ac Adjust mountroot routines to vrele rootvp in case of mount error. Closes
PR 7977 by Neil Carson, <neil@brini.com>.
1999-07-17 01:08:28 +00:00
mycroft 704563569f It was silly to not make this exportable. 1999-04-04 18:15:58 +00:00
wrstuden 862a56e88b Modify vfsops to seperate vfs_fhtovp() into two routines. vfs_fhtovp() now
only handles the file handle to vnode conversion, and a new call,
vfs_checkexp(), performs the export verification.
1999-02-26 23:44:43 +00:00
perry 27ca6798df bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:15:38 +00:00
jonathan d275e56dee * defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.
1998-07-05 08:49:30 +00:00
fvdl 8c7c2ea123 Remove accidentally enabled mfs_mountroot from vfsops struct. 1998-03-01 22:16:01 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej b5bf2ed6d0 Place a pointer to an array of our vnodeopv_desc *'s in our vfsops
structure, for use by vfs_attach().
1998-02-18 07:05:47 +00:00
mrg 295af85e9e remove swap configuration. 1997-06-12 17:12:17 +00:00
fvdl 8b21bbed9b Implement similar fix as in the NQNFS fix from BSDI, to avoid race conditions
when unmounting. It cleans up the loop a bit too.
1997-02-22 03:25:05 +00:00
cgd 90688fce27 Change the second and third args to struct vfsops' (*vfs_mount)() to
'const char *', and 'void *', respectively.  The second arg is taken directly
from user arguments, and is const there, so must be const in the prototypes
and functions.  The third arg is also taken directly from user arguments.
It doesn't have to be changed, but since it's cleaner to keep the type
the same as the user arg's type, and I'm already making the 'const char *'
change...
1996-12-22 10:10:12 +00:00
christos 573481f5fc mfs prototypes 1996-02-09 22:31:27 +00:00
mycroft b2f17c7648 Do any pending I/O before trying to unmount, per John Kohl. 1995-09-01 19:39:18 +00:00
cgd 8f62c773e8 don't assume the f_fsnamelen is nul-truncated or longer than MFSNAMELEN 1995-06-18 14:45:14 +00:00
mycroft 2f805fa51b copy*str() should use size_t. 1995-03-09 12:05:21 +00:00
cgd ad86c7f247 size for copyinstr should be u_long 1995-03-08 01:51:49 +00:00
mycroft 41f181e0d8 Clean up the code to frob mnt_stat a bit. 1995-01-18 09:44:34 +00:00
mycroft 9843f45605 Turn mountlist into a CIRCLEQ, and handle setting and checking of MNT_ROOTFS
differently.
1995-01-18 06:19:49 +00:00