summaryrefslogtreecommitdiff
path: root/sys/ufs/mfs
AgeCommit message (Collapse)Author
2018-04-28Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is alwaysVisa Hankala
curproc that does the locking or unlocking, so the proc parameter is pointless and can be dropped. OK mpi@, deraadt@
2018-04-02Add size to free()David Hill
OK millert@ visa@
2017-12-11In uvm Chuck decided backing store would not be allocated proactivelyTheo de Raadt
for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops. ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
2017-01-10Remove the unused olddp parameter from function dounmount().Alexander Bluhm
OK mpi@ millert@
2016-11-07Split PID from TID, giving processes a PID unrelated to the TID of theirPhilip Guenther
initial thread ok jsing@ kettenis@
2016-09-08move mfs_pri into tsleep so it's easy to see and it doesn't changeTed Unangst
2016-09-08delete useless comments, such as how KVA is mapped on HPTed Unangst
2016-04-26Populate all necessary statfs members in .vfs_statfs. cd9660, udf,Martin Natano
msdosfs and nfsv2 don't set f_namemax. ntfs and ext2fs don't set f_namemeax and f_favail. fusefs doesn't set f_mntfromspec, f_favail and f_iosize. Also, make all filesystems use copy_statfs_info(), so that all statfs information is filled in correctly for the (sb != &mp->mnt-stat) case. ok stefan
2016-03-19Remove the unused flags argument from VOP_UNLOCK().natano
torture tested on amd64, i386 and macppc ok beck mpi stefan "the change looks right" deraadt
2016-03-14Change a bunch of (<blah> *)0 to NULL.Kenneth R Westerback
ok beck@ deraadt@
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2013-12-12replace old bcopy/bzero with standard functions. ok kettenisTed Unangst
2013-04-15Add an f_mntfromspec member to struct statfs, which specifies the name ofJoel Sing
the special provided when the mount was requested. This may be the same as the special that was actually used for the mount (e.g. in the case of a device node) or it may be different (e.g. in the case of a DUID). Whilst here, change f_ctime to a 64 bit type and remove the pointless f_spare members. Compatibility goo courtesy of guenther@ ok krw@ millert@
2013-01-15Switch mfs to bufq. This simplifies the code, gives us queue limits forJoel Sing
free and uses FIFO queueing (rather than the current LIFO queueing). Tested by sthen@ ok beck@ krw@
2012-12-29Keep mfs from potentially consuming the entire buffer cache if it getsBob Beck
behind. ok jsing@
2012-09-10Cleanup VFS mount string handling:Joel Sing
- Avoid using copyinstr() without checking the return value. - sys_mount() has already copied the path in, so pass this to the filesystem mount code so that it does not have to copy it in again. - Avoid copyinstr()/bzero() dance when we can simply bzero() and strlcpy(). ok krw@
2011-07-04move the specfs code to a place people can see it; ok guenther thib krwTheo de Raadt
2011-04-05Every single vop_default is set to eopnotsupp, so retire itThordur I. Bjornsson
and return EOPNOTSUPP directly from the VOP_* functions. Filesystems should, at some point fill in every function in the vop_default struct so we can get rid of the 'if' statements in VOP_*.
2010-12-21Bring back the "End the VOP experiment." diff, naddy's issues whereThordur I. Bjornsson
unrelated, and his alpha is much happier now. OK deraadt@
2010-09-10Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)Thordur I. Bjornsson
have been resolved.
2010-09-06End the VOP experiment. Instead of the ridicolusly complicated operationThordur I. Bjornsson
vector setup that has questionable features (that have, as far as I can tell never been used in practice, atleast not in OpenBSD), remove all the gunk and favor a simple struct full of function pointers that get set directly by each of the filesystems. Removes gobs of ugly code and makes things simpler by a magnitude. The only downside of this is that we loose the vnoperate feature so the spec/fifo operations of the filesystems need to be kept in sync with specfs and fifofs, this is no big deal as the API it self is pretty static. Many thanks to armani@ who pulled an earlier version of this diff to current after c2k10 and Gabriel Kihlman on tech@ for testing. Liked by many. "come on, find your balls" deraadt@.
2009-08-13- remove super-obvious comments from $fs_vnodeop_entries[]Jasper Lievisse Adriaanse
prodded by and ok thib@ agreed by art@ and blambert@
2008-09-30Fix an occasional mfs-related panic on reboot in mfs_close. There's noTodd C. Miller
need to check v_usecount, the buffer queue check is sufficient. From mickey. OK deraadt@
2008-05-08retire vn_default_error() and replace all instancesThordur I. Bjornsson
with eopnotsupp() instead; ok blambert@
2008-05-03Introduce vop_generic_bmap(); use it where applicable.Thordur I. Bjornsson
one thing of note, fifofs changes in that its bmap now sets the runp too 0, but that was an oversight in the old code. ok art@
2008-04-24remove useless defines for the vnode operations, and insteadThordur I. Bjornsson
init the op array functions with whatever the define was set too. ok dlg@,blambert@
2007-12-16fix remaining cases of potential concurrent mfs_buflist access;Otto Moerbeek
ok deraadt@ millert@
2007-12-06solve the biggest problem with concurrent buflist access; makes mfs onOtto Moerbeek
SMP machines reliable. few corner cases remain, which will be dealt with later; ok deraadt@ millert@
2007-12-04fix out of partition/memory bounds access when accessing blocks at the tailOtto Moerbeek
end; avoids bad address errors; original diff by me with cleanup by millert@; ok millert@
2007-11-28g/c mfs_mountroot() and mfs_initminiroot(). We don't support root onTodd C. Miller
mfs. OK deraadt@
2007-11-24Try a forced unmount if mount_mfs is killed with SIGKILL.Marco Pfatschbacher
OK tedu@
2007-06-01pedro ok'd this ~3500 line diff which removes the vop argumentTheo de Raadt
"ap = v" comments in under 8 seconds, so it must be ok. and it compiles too.
2007-02-07grammar fix; from bret lambertJason McIntyre
2006-06-25rename vfs_busy() flags VB_UMIGNORE/VB_UMWAIT to VB_NOWAIT/VB_WAITNikolay Sturm
requested by and ok pedro
2006-06-14move vfs_busy() to rwlocks and properly hide the locking api from vfsNikolay Sturm
ok tedu, pedro
2006-04-30remove the simplelock argument from vfs_busy() which is currently notNikolay Sturm
used and will never be used this way in VFS requested by and ok pedro, ok krw, biorn
2006-04-19Remove unused mount list simple_lock() gooPedro Martelletto
2006-03-28ANSIfy and deregister, no binary change.Pedro Martelletto
From: Thordur I. Bjornsson <thib@mi.is>
2005-11-30No need for vfs_busy() and vfs_unbusy() to take a process pointerPedro Martelletto
anymore. Testing by jolan@, thanks.
2005-07-03Extended Attributes was a piece to get to ACLs, however ACLs have notDale Rahn
been worked on, so EA is pointless. Also the code is not enabled in GENERIC so it is not being tested or maintained.
2005-03-06Use V_SAVE instead of hardcoding it, no binary change.Pedro Martelletto
2004-06-04rootvp is already externed in systm.h, no need for a local externTed Unangst
2003-09-23Replace select backends with poll backends. selscan() and pollscan()Todd C. Miller
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
2003-08-14constify vfsops; tedu@ okMichael Shalayeff
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-05-11revert part of previous. if mfs gets a signal, it doesn't attempt toTed Unangst
force the unmount, so there's no need to mess with resetting processes' working dirs.
2003-05-06attempt to put a process's cwd back in place after a forced umount.Ted Unangst
won't always work, but it's the best we can do for now. this covers at least some of the failure cases the previous commit to vfs_lookup.c checks for. ok weingart@
2002-07-12Change the locking on the mountpoint slightly. Instead of using mnt_lockArtur Grabowski
to get shared locks for lookup and get the exclusive lock only with LK_DRAIN on unmount and do the real exclusive locking with flags in mnt_flags, we now use shared locks for lookup and an exclusive lock for unmount. This is accomplished by slightly changing the semantics of vfs_busy. Old vfs_busy behavior: - with LK_NOWAIT set in flags, a shared lock was obtained if the mountpoint wasn't being unmounted, otherwise we just returned an error. - with no flags, a shared lock was obtained if the mountpoint was being unmounted, otherwise we slept until the unmount was done and returned an error. LK_NOWAIT was used for sync(2) and some statistics code where it isn't really critical that we get the correct results. 0 was used in fchdir and lookup where it's critical that we get the right directory vnode for the filesystem root. After this change vfs_busy keeps the same behavior for no flags and LK_NOWAIT. But if some other flags are passed into it, they are passed directly into lockmgr (actually LK_SLEEPFAIL is always added to those flags because if we sleep for the lock, that means someone was holding the exclusive lock and the exclusive lock is only held when the filesystem is being unmounted. More changes: dounmount must now be called with the exclusive lock held. (before this the caller was supposed to hold the vfs_busy lock, but that wasn't always true). Zap some (now) unused mount flags. And the highlight of this change: Add some vfs_busy calls to match some vfs_unbusy calls, especially in sys_mount. (lockmgr doesn't detect the case where we release a lock noone holds (it will do that soon)). If you've seen hangs on reboot with mfs this should solve it (I repeat this for the fourth time now, but this time I spent two months fixing and redesigning this and reading the code so this time I must have gotten this right).
2002-06-21Remove pointless macro.Artur Grabowski