diff options
author | kib <kib@FreeBSD.org> | 2016-06-26 20:07:24 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-06-26 20:07:24 +0000 |
commit | 2b281bf08f5c2e942626c0fe461285f39fbf8df8 (patch) | |
tree | bf68775a98ecb1f2103f9d9861cc640243eb614c /sys/sys/mount.h | |
parent | 79c9e44bf34a9f4f0d674636e288db1de61f9408 (diff) | |
download | FreeBSD-src-2b281bf08f5c2e942626c0fe461285f39fbf8df8.zip FreeBSD-src-2b281bf08f5c2e942626c0fe461285f39fbf8df8.tar.gz |
Rewrite sigdeferstop(9) and sigallowstop(9) into more flexible
framework allowing to set the suspension policy for the dynamic block.
Extend the currently possible policies of stopping on interruptible
sleeps and ignoring such sleeps by two more: do not suspend at
interruptible sleeps, but interrupt them with either EINTR or ERESTART.
Reviewed by: jilles
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Approved by: re (gjb)
Diffstat (limited to 'sys/sys/mount.h')
-rw-r--r-- | sys/sys/mount.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h index f11f8f5..5438140 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -653,15 +653,15 @@ vfs_statfs_t __vfs_statfs; #define VFS_PROLOGUE(MP) do { \ struct mount *mp__; \ - int _enable_stops; \ + int _prev_stops; \ \ mp__ = (MP); \ - _enable_stops = (mp__ != NULL && \ - (mp__->mnt_vfc->vfc_flags & VFCF_SBDRY) && sigdeferstop()) + _prev_stops = sigdeferstop((mp__ != NULL && \ + (mp__->mnt_vfc->vfc_flags & VFCF_SBDRY) != 0) ? \ + SIGDEFERSTOP_SILENT : SIGDEFERSTOP_NOP); #define VFS_EPILOGUE(MP) \ - if (_enable_stops) \ - sigallowstop(); \ + sigallowstop(_prev_stops); \ } while (0) #define VFS_MOUNT(MP) ({ \ |