nfsdport.h (217063) | nfsdport.h (224086) |
---|---|
1/*- 2 * Copyright (c) 2009 Rick Macklem, University of Guelph 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2009 Rick Macklem, University of Guelph 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/fs/nfs/nfsdport.h 217063 2011-01-06 19:50:11Z rmacklem $ | 26 * $FreeBSD: head/sys/fs/nfs/nfsdport.h 224086 2011-07-16 08:51:09Z zack $ |
27 */ 28 29/* 30 * These macros handle nfsvattr fields. They look a bit silly here, but 31 * are quite different for the Darwin port. 32 */ 33#define NFSVNO_ATTRINIT(n) (VATTR_NULL(&((n)->na_vattr))) 34#define NFSVNO_SETATTRVAL(n, f, v) ((n)->na_##f = (v)) --- 17 unchanged lines hidden (view full) --- 52 * needs to be returned by nfsd_fhtovp(). 53 */ 54struct nfsexstuff { 55 int nes_exflag; /* export flags */ 56 int nes_numsecflavor; /* # of security flavors */ 57 int nes_secflavors[MAXSECFLAVORS]; /* and the flavors */ 58}; 59 | 27 */ 28 29/* 30 * These macros handle nfsvattr fields. They look a bit silly here, but 31 * are quite different for the Darwin port. 32 */ 33#define NFSVNO_ATTRINIT(n) (VATTR_NULL(&((n)->na_vattr))) 34#define NFSVNO_SETATTRVAL(n, f, v) ((n)->na_##f = (v)) --- 17 unchanged lines hidden (view full) --- 52 * needs to be returned by nfsd_fhtovp(). 53 */ 54struct nfsexstuff { 55 int nes_exflag; /* export flags */ 56 int nes_numsecflavor; /* # of security flavors */ 57 int nes_secflavors[MAXSECFLAVORS]; /* and the flavors */ 58}; 59 |
60/* 61 * These are NO-OPS for BSD until Isilon upstreams EXITCODE support. 62 * EXITCODE is an in-memory ring buffer that holds the routines failing status. 63 * This is a valuable tool to use when debugging and analyzing issues. 64 * In addition to recording a routine's failing status, it offers 65 * logging of routines for call stack tracing. 66 * EXITCODE should be used only in routines that return a true errno value, as 67 * that value will be formatted to a displayable errno string. Routines that 68 * return regular int status that are not true errno should not set EXITCODE. 69 * If you want to log routine tracing, you can add EXITCODE(0) to any routine. 70 * NFS extended the EXITCODE with EXITCODE2 to record either the routine's 71 * exit errno status or the nd_repstat. 72 */ 73#define NFSEXITCODE(error) 74#define NFSEXITCODE2(error, nd) 75 |
|
60#define NFSVNO_EXINIT(e) ((e)->nes_exflag = 0) 61#define NFSVNO_EXPORTED(e) ((e)->nes_exflag & MNT_EXPORTED) 62#define NFSVNO_EXRDONLY(e) ((e)->nes_exflag & MNT_EXRDONLY) 63#define NFSVNO_EXPORTANON(e) ((e)->nes_exflag & MNT_EXPORTANON) 64#define NFSVNO_EXSTRICTACCESS(e) ((e)->nes_exflag & MNT_EXSTRICTACCESS) 65#define NFSVNO_EXV4ONLY(e) ((e)->nes_exflag & MNT_EXV4ONLY) 66 67#define NFSVNO_SETEXRDONLY(e) ((e)->nes_exflag = (MNT_EXPORTED|MNT_EXRDONLY)) --- 36 unchanged lines hidden --- | 76#define NFSVNO_EXINIT(e) ((e)->nes_exflag = 0) 77#define NFSVNO_EXPORTED(e) ((e)->nes_exflag & MNT_EXPORTED) 78#define NFSVNO_EXRDONLY(e) ((e)->nes_exflag & MNT_EXRDONLY) 79#define NFSVNO_EXPORTANON(e) ((e)->nes_exflag & MNT_EXPORTANON) 80#define NFSVNO_EXSTRICTACCESS(e) ((e)->nes_exflag & MNT_EXSTRICTACCESS) 81#define NFSVNO_EXV4ONLY(e) ((e)->nes_exflag & MNT_EXV4ONLY) 82 83#define NFSVNO_SETEXRDONLY(e) ((e)->nes_exflag = (MNT_EXPORTED|MNT_EXRDONLY)) --- 36 unchanged lines hidden --- |