diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2012-10-14 22:33:17 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2012-10-14 22:33:17 +0000 |
commit | 813fc271886f8973789b4c3847329a2c39a4f29c (patch) | |
tree | fd9a8026f443d2f981842db8e496af20a034749c /sys/nfs | |
parent | b75b22519f1551241f5a6449d248028e60dff704 (diff) | |
download | FreeBSD-src-813fc271886f8973789b4c3847329a2c39a4f29c.zip FreeBSD-src-813fc271886f8973789b4c3847329a2c39a4f29c.tar.gz |
Add two new options to the nfssvc(2) syscall that allow
processes running as root to suspend/resume execution
of the kernel nfsd threads. An earlier version of this
patch was tested by Vincent Hoffman (vince at unsane.co.uk)
and John Hickey (jh at deterlab.net).
Reviewed by: kib
MFC after: 2 weeks
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_nfssvc.c | 3 | ||||
-rw-r--r-- | sys/nfs/nfssvc.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/nfs/nfs_nfssvc.c b/sys/nfs/nfs_nfssvc.c index 9680eb7..25dfee8 100644 --- a/sys/nfs/nfs_nfssvc.c +++ b/sys/nfs/nfs_nfssvc.c @@ -102,7 +102,8 @@ sys_nfssvc(struct thread *td, struct nfssvc_args *uap) else if ((uap->flag & (NFSSVC_NFSDNFSD | NFSSVC_NFSDADDSOCK | NFSSVC_PUBLICFH | NFSSVC_V4ROOTEXPORT | NFSSVC_NOPUBLICFH | NFSSVC_STABLERESTART | NFSSVC_ADMINREVOKE | - NFSSVC_DUMPCLIENTS | NFSSVC_DUMPLOCKS | NFSSVC_BACKUPSTABLE)) && + NFSSVC_DUMPCLIENTS | NFSSVC_DUMPLOCKS | NFSSVC_BACKUPSTABLE | + NFSSVC_SUSPENDNFSD | NFSSVC_RESUMENFSD)) && nfsd_call_nfsd != NULL) error = (*nfsd_call_nfsd)(td, uap); if (error == EINTR || error == ERESTART) diff --git a/sys/nfs/nfssvc.h b/sys/nfs/nfssvc.h index 2615d07..6e636d5 100644 --- a/sys/nfs/nfssvc.h +++ b/sys/nfs/nfssvc.h @@ -66,5 +66,7 @@ #define NFSSVC_BACKUPSTABLE 0x00800000 #define NFSSVC_ZEROCLTSTATS 0x01000000 /* modifier for GETSTATS */ #define NFSSVC_ZEROSRVSTATS 0x02000000 /* modifier for GETSTATS */ +#define NFSSVC_SUSPENDNFSD 0x04000000 +#define NFSSVC_RESUMENFSD 0x08000000 #endif /* _NFS_NFSSVC_H */ |