NetBSD/sys/ufs/mfs
christos 6555ff0ad3 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.
2006-04-15 01:16:40 +00:00
..
Makefile
mfs_extern.h merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
mfs_vfsops.c From my posting of April 3 to tech-kern: 2006-04-15 01:16:40 +00:00
mfs_vnops.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
mfsnode.h merge ktrace-lwp. 2005-12-11 12:16:03 +00:00