kernel - Fix mount refs interactions and umount races * It is possible for a umount to race other operations on active mount point, causing one or the other to deadlock. * vfs_busy()/vfs_unbusy() now incr/decr mp->mnt_refs. * cache_findmount() now increments mp->mnt_refs, and add a new API function cache_dropmount() which decrements it.
kernel - Fix fstatfs() and fstatvfs() when called from a null-mounted chroot() * These funtions were using the wrong starting mount pointer when calling cache_fullpath(). They were using the mount pointer for the open file's vnode instead of the overlay (null) mount pointer. This caused cache_fullpath() to believe the fd represented a file outside the chroot and return an error. Reported-by: Francois Tigeot<ftigeot@wolfpond.org>:
kernel - Remove safety mplocks around VFS system calls * Remove the safety get_mplock()/rel_mplock() calls around numerous VFS system calls. The MP lock or per-mount token is handled deeper in the filesystem code. * open() has been running without the safety mplock's for a while to testing nlookup(). nlookup() should be MPSAFE. The safety mplocks being removed were primarily there to protect it.
kernel - Do a better job with the filesystem background sync * Adjust code for MNT_LAZY, MNT_NOWAIT, and MNT_WAITOK to reflect the fact that they are three different flags and not enumeration constants. * HAMMER now sets VMSC_ONEPASS for MNT_LAZY syncs (background filesystem sync). This generally reduces instances where the background sync winds up running continuously when heavy filesystem ops saturate the disk. Fewer vnodes dirtied after the sync is initiated will get caught up in the sync.
kernel - Add many sysctl definitions, sysv, vfs, nfs, etc. * Also take the opportunity to remove some dead (no longer referenced sysctl's), these are: vfs.cache.dothits vfs.cache.dotdothits vfs.cache.nummiss vfs.cache.nummisszap vfs.cache.numposzaps vfs.cache.numposhits vfs.cache.numnegzaps vfs.cache.numneghits vfs.reassignbufloops vfs.reassignbufsortgood vfs.reassignbufsortbad vfs.reassignbufmethod vfs.nfs.defect vfs.cache.numfullpathfail4 vfs.cache.numfullpathfail3 vfs.cache.numfullpathfail2 vfs.cache.numfullpathfail1 vfs.cache.numcwdfail4 vfs.cache.numcwdfail3 vfs.cache.numcwdfail2 vfs.cache.numcwdfail1 * Add back a couple of vfs.cache sysctl's with improved names vfs.cache.numcwdfailnf vfs.cache.numcwdfailsz vfs.cache.numfullpathfailnf vfs.cache.numfullpathfailsz Submitted-by: Taras Klaskovsky Sponsored-by: Google Code-In
spinlocks - Rename API to spin_{try,un,}lock * Rename the API to spin_trylock, spin_unlock and spin_lock instead of spin_lock_wr, spin_unlock_wr and spin_trylock_wr now that we only have exclusive spinlocks. * 99% of this patch was generated by a semantic coccinelle patch
unmount - fix issue with process refs on unmount * The p_textnch introduction made this issue appear, as some processes are still alive at system shutdown and their p_textnch were holding these references to the mount nch. * On unmount of a filesystem we now scan all active processes for procs whose p_textnch is related to the mountpoint we are getting rid of, and release these. Dragonfly-bug: http://bugs.dragonflybsd.org/issue1708 Special-Thanks-To: Antonio Huete (tuxillo@) for identifying the offending commit and extensive testing