git: kernel - Improve umount -f operation

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Oct 17 11:23:55 PDT 2024


commit b07befac9dbf0ff12cd56e44bb635c15145d23f6
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Oct 17 11:11:32 2024 -0700

    kernel - Improve umount -f operation
    
    * Increase the process test/kill retry loop for umount -f from 10
      to 50 (from 2.5 seconds to 12.5 seconds) to give processes more
      time to exit after receiving a KILL signal.
    
    * Make the tsleep() used for the retry delay unconditional to ensure a
      reasonable period of time is allowed to elapse.
    
    * Release the mount structure lock during the 0.25 second tsleep()
      in the retry loop.  This allows processes to unstick during the
      umount -f retry loop.
    
    * Add a P_MUSTKILL flag to the process structure, set if necessary
      during a umount -f.  Process core dumps (which are usually
      uninterruptable) will be aborted if this flag is found to be set.
      Further tests for this flag may be needed.
    
    Reported-by: marino (via loki kernel crash)

Summary of changes:
 sys/kern/imgact_elf.c   |  4 ++++
 sys/kern/kern_sig.c     |  5 ++++-
 sys/kern/vfs_syscalls.c | 20 +++++++++++++++-----
 sys/sys/proc.h          |  2 +-
 4 files changed, 24 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b07befac9dbf0ff12cd56e44bb635c15145d23f6


-- 
DragonFly BSD source repository


More information about the Commits mailing list