Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   christos
Date:           Sat Apr 15 01:16:40 UTC 2006

Modified Files:
        src/sys/nfs: nfs_nqlease.c
        src/sys/sys: signalvar.h
        src/sys/ufs/mfs: mfs_vfsops.c

Log Message:
>From my posting of April 3 to tech-kern:

My understanding is that the CLRSIG() is supposed to clear the signal
that was sent to the syncer process to prevent it from being delivered
to the syncer process in case unmounting fails, so that the syncer process
does not die while the filesystem is still mounted. The typical scenario
is, the syncher process is tsleep()ing in the kernel, and waking up when
it needs to do work. If someone sends a signal to it, eg. kill -TERM
the mfs process, then the kernel will try to unmount the mfs filesystem
before delivering the signal to the process. If that unmount fails, then
we should not really kill the process because that will hang the mount.
So we call CLRSIG() to stop the signal from being delivered.

So the first call to issignal() will return the signal number that was
sent to the syncer process (unless someone malicious was able to send
a lower numbered signal between the time tsleep() returned and we called
issignal()... something that is not really easy to do). But you are
right, we should not be calling it many times as a side effect of this
macro.

Rewrite CLRSIG() clear all the signals and call issignal() the correct
number of times.


To generate a diff of this commit:
cvs rdiff -r1.59 -r1.60 src/sys/nfs/nfs_nqlease.c
cvs rdiff -r1.63 -r1.64 src/sys/sys/signalvar.h
cvs rdiff -r1.71 -r1.72 src/sys/ufs/mfs/mfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index