aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfsd/nfsd.h
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-03 01:29:11 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-04-03 20:41:23 -0400
commit7e70570647827345352cf6c17461c9fa166f570a (patch)
treea200662bb68cd9a1396c365a47b50e46f0ea9f73 /include/linux/nfsd/nfsd.h
parent95ec28cda323104bbff64fc7ec8ee4c9042e51fa (diff)
nfsd41: support for 3-word long attribute bitmask
Also, use client minorversion to generate supported attrs Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/nfsd/nfsd.h')
-rw-r--r--include/linux/nfsd/nfsd.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index 5bed5096874d..69ca788f8fc5 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -346,7 +346,7 @@ extern struct timeval nfssvc_boot;
346 * TIME_BACKUP (unlikely to be supported any time soon) 346 * TIME_BACKUP (unlikely to be supported any time soon)
347 * TIME_CREATE (unlikely to be supported any time soon) 347 * TIME_CREATE (unlikely to be supported any time soon)
348 */ 348 */
349#define NFSD_SUPPORTED_ATTRS_WORD0 \ 349#define NFSD4_SUPPORTED_ATTRS_WORD0 \
350(FATTR4_WORD0_SUPPORTED_ATTRS | FATTR4_WORD0_TYPE | FATTR4_WORD0_FH_EXPIRE_TYPE \ 350(FATTR4_WORD0_SUPPORTED_ATTRS | FATTR4_WORD0_TYPE | FATTR4_WORD0_FH_EXPIRE_TYPE \
351 | FATTR4_WORD0_CHANGE | FATTR4_WORD0_SIZE | FATTR4_WORD0_LINK_SUPPORT \ 351 | FATTR4_WORD0_CHANGE | FATTR4_WORD0_SIZE | FATTR4_WORD0_LINK_SUPPORT \
352 | FATTR4_WORD0_SYMLINK_SUPPORT | FATTR4_WORD0_NAMED_ATTR | FATTR4_WORD0_FSID \ 352 | FATTR4_WORD0_SYMLINK_SUPPORT | FATTR4_WORD0_NAMED_ATTR | FATTR4_WORD0_FSID \
@@ -358,7 +358,7 @@ extern struct timeval nfssvc_boot;
358 | FATTR4_WORD0_MAXFILESIZE | FATTR4_WORD0_MAXLINK | FATTR4_WORD0_MAXNAME \ 358 | FATTR4_WORD0_MAXFILESIZE | FATTR4_WORD0_MAXLINK | FATTR4_WORD0_MAXNAME \
359 | FATTR4_WORD0_MAXREAD | FATTR4_WORD0_MAXWRITE | FATTR4_WORD0_ACL) 359 | FATTR4_WORD0_MAXREAD | FATTR4_WORD0_MAXWRITE | FATTR4_WORD0_ACL)
360 360
361#define NFSD_SUPPORTED_ATTRS_WORD1 \ 361#define NFSD4_SUPPORTED_ATTRS_WORD1 \
362(FATTR4_WORD1_MODE | FATTR4_WORD1_NO_TRUNC | FATTR4_WORD1_NUMLINKS \ 362(FATTR4_WORD1_MODE | FATTR4_WORD1_NO_TRUNC | FATTR4_WORD1_NUMLINKS \
363 | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP | FATTR4_WORD1_RAWDEV \ 363 | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP | FATTR4_WORD1_RAWDEV \
364 | FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE | FATTR4_WORD1_SPACE_TOTAL \ 364 | FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE | FATTR4_WORD1_SPACE_TOTAL \
@@ -366,6 +366,35 @@ extern struct timeval nfssvc_boot;
366 | FATTR4_WORD1_TIME_DELTA | FATTR4_WORD1_TIME_METADATA \ 366 | FATTR4_WORD1_TIME_DELTA | FATTR4_WORD1_TIME_METADATA \
367 | FATTR4_WORD1_TIME_MODIFY | FATTR4_WORD1_TIME_MODIFY_SET | FATTR4_WORD1_MOUNTED_ON_FILEID) 367 | FATTR4_WORD1_TIME_MODIFY | FATTR4_WORD1_TIME_MODIFY_SET | FATTR4_WORD1_MOUNTED_ON_FILEID)
368 368
369#define NFSD4_SUPPORTED_ATTRS_WORD2 0
370
371#define NFSD4_1_SUPPORTED_ATTRS_WORD0 \
372 NFSD4_SUPPORTED_ATTRS_WORD0
373
374#define NFSD4_1_SUPPORTED_ATTRS_WORD1 \
375 NFSD4_SUPPORTED_ATTRS_WORD1
376
377#define NFSD4_1_SUPPORTED_ATTRS_WORD2 \
378 NFSD4_SUPPORTED_ATTRS_WORD2
379
380static inline u32 nfsd_suppattrs0(u32 minorversion)
381{
382 return minorversion ? NFSD4_1_SUPPORTED_ATTRS_WORD0
383 : NFSD4_SUPPORTED_ATTRS_WORD0;
384}
385
386static inline u32 nfsd_suppattrs1(u32 minorversion)
387{
388 return minorversion ? NFSD4_1_SUPPORTED_ATTRS_WORD1
389 : NFSD4_SUPPORTED_ATTRS_WORD1;
390}
391
392static inline u32 nfsd_suppattrs2(u32 minorversion)
393{
394 return minorversion ? NFSD4_1_SUPPORTED_ATTRS_WORD2
395 : NFSD4_SUPPORTED_ATTRS_WORD2;
396}
397
369/* These will return ERR_INVAL if specified in GETATTR or READDIR. */ 398/* These will return ERR_INVAL if specified in GETATTR or READDIR. */
370#define NFSD_WRITEONLY_ATTRS_WORD1 \ 399#define NFSD_WRITEONLY_ATTRS_WORD1 \
371(FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET) 400(FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET)
@@ -376,6 +405,7 @@ extern struct timeval nfssvc_boot;
376#define NFSD_WRITEABLE_ATTRS_WORD1 \ 405#define NFSD_WRITEABLE_ATTRS_WORD1 \
377(FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \ 406(FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \
378 | FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET) 407 | FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET)
408#define NFSD_WRITEABLE_ATTRS_WORD2 0
379 409
380#endif /* CONFIG_NFSD_V4 */ 410#endif /* CONFIG_NFSD_V4 */
381 411