Matthew Dillon
2018-12-08 05:31:02 UTC
commit f09525a92ec9e82964bc791e5df0cd0c8701583d
Author: Matthew Dillon <***@apollo.backplane.com>
Date: Thu Dec 6 18:50:07 2018 -0800
kernel - Improve umount operation
* Move the cache_inval(), and both cache_unmounting() and
cache_clearmntcache() into the retry loop. This ensures that
the nc_refs test actually has a chance to update during the retry.
This should significantly improve umount operation, reducing umount
races against exiting processes still using the filesystem.
* Only issue the allproc scan which matches and clears proc->p_textnch
on a forced umount. Otherwise disallow the umount attempt. We
may have to reallow this later, but the shutdown code now properly
clears p_textnch so it should take care of the case for us (which
is why this code was originally present).
* Properly dispose of p->p_textnch during shutdown/halt/reboot for
the calling process, proc0, and init. This is an attempt to allow
the system to cleanly unmount root.
* Cleanup the warning and error messages to clarify umount failures.
* Only reinstasll the syncer vp on error if umount deinstalled it.
* Add some debugging sysctls (default disabled).
Reported-by: marino
Summary of changes:
sys/kern/kern_shutdown.c | 2 +
sys/kern/vfs_mount.c | 19 ++++---
sys/kern/vfs_syscalls.c | 138 ++++++++++++++++++++++++++++-------------------
3 files changed, 95 insertions(+), 64 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f09525a92ec9e82964bc791e5df0cd0c8701583d
Author: Matthew Dillon <***@apollo.backplane.com>
Date: Thu Dec 6 18:50:07 2018 -0800
kernel - Improve umount operation
* Move the cache_inval(), and both cache_unmounting() and
cache_clearmntcache() into the retry loop. This ensures that
the nc_refs test actually has a chance to update during the retry.
This should significantly improve umount operation, reducing umount
races against exiting processes still using the filesystem.
* Only issue the allproc scan which matches and clears proc->p_textnch
on a forced umount. Otherwise disallow the umount attempt. We
may have to reallow this later, but the shutdown code now properly
clears p_textnch so it should take care of the case for us (which
is why this code was originally present).
* Properly dispose of p->p_textnch during shutdown/halt/reboot for
the calling process, proc0, and init. This is an attempt to allow
the system to cleanly unmount root.
* Cleanup the warning and error messages to clarify umount failures.
* Only reinstasll the syncer vp on error if umount deinstalled it.
* Add some debugging sysctls (default disabled).
Reported-by: marino
Summary of changes:
sys/kern/kern_shutdown.c | 2 +
sys/kern/vfs_mount.c | 19 ++++---
sys/kern/vfs_syscalls.c | 138 ++++++++++++++++++++++++++++-------------------
3 files changed, 95 insertions(+), 64 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f09525a92ec9e82964bc791e5df0cd0c8701583d
--
DragonFly BSD source repository
DragonFly BSD source repository