aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
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 /fs/nfsd/nfs4proc.c
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 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 937853f62834..e206053433e3 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -463,8 +463,9 @@ nfsd4_getattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
463 if (getattr->ga_bmval[1] & NFSD_WRITEONLY_ATTRS_WORD1) 463 if (getattr->ga_bmval[1] & NFSD_WRITEONLY_ATTRS_WORD1)
464 return nfserr_inval; 464 return nfserr_inval;
465 465
466 getattr->ga_bmval[0] &= NFSD_SUPPORTED_ATTRS_WORD0; 466 getattr->ga_bmval[0] &= nfsd_suppattrs0(cstate->minorversion);
467 getattr->ga_bmval[1] &= NFSD_SUPPORTED_ATTRS_WORD1; 467 getattr->ga_bmval[1] &= nfsd_suppattrs1(cstate->minorversion);
468 getattr->ga_bmval[2] &= nfsd_suppattrs2(cstate->minorversion);
468 469
469 getattr->ga_fhp = &cstate->current_fh; 470 getattr->ga_fhp = &cstate->current_fh;
470 return nfs_ok; 471 return nfs_ok;
@@ -555,8 +556,9 @@ nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
555 if (readdir->rd_bmval[1] & NFSD_WRITEONLY_ATTRS_WORD1) 556 if (readdir->rd_bmval[1] & NFSD_WRITEONLY_ATTRS_WORD1)
556 return nfserr_inval; 557 return nfserr_inval;
557 558
558 readdir->rd_bmval[0] &= NFSD_SUPPORTED_ATTRS_WORD0; 559 readdir->rd_bmval[0] &= nfsd_suppattrs0(cstate->minorversion);
559 readdir->rd_bmval[1] &= NFSD_SUPPORTED_ATTRS_WORD1; 560 readdir->rd_bmval[1] &= nfsd_suppattrs1(cstate->minorversion);
561 readdir->rd_bmval[2] &= nfsd_suppattrs2(cstate->minorversion);
560 562
561 if ((cookie > ~(u32)0) || (cookie == 1) || (cookie == 2) || 563 if ((cookie > ~(u32)0) || (cookie == 1) || (cookie == 2) ||
562 (cookie == 0 && memcmp(readdir->rd_verf.data, zeroverf.data, NFS4_VERIFIER_SIZE))) 564 (cookie == 0 && memcmp(readdir->rd_verf.data, zeroverf.data, NFS4_VERIFIER_SIZE)))
@@ -746,8 +748,9 @@ _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
746 if (status) 748 if (status)
747 return status; 749 return status;
748 750
749 if ((verify->ve_bmval[0] & ~NFSD_SUPPORTED_ATTRS_WORD0) 751 if ((verify->ve_bmval[0] & ~nfsd_suppattrs0(cstate->minorversion))
750 || (verify->ve_bmval[1] & ~NFSD_SUPPORTED_ATTRS_WORD1)) 752 || (verify->ve_bmval[1] & ~nfsd_suppattrs1(cstate->minorversion))
753 || (verify->ve_bmval[2] & ~nfsd_suppattrs2(cstate->minorversion)))
751 return nfserr_attrnotsupp; 754 return nfserr_attrnotsupp;
752 if ((verify->ve_bmval[0] & FATTR4_WORD0_RDATTR_ERROR) 755 if ((verify->ve_bmval[0] & FATTR4_WORD0_RDATTR_ERROR)
753 || (verify->ve_bmval[1] & NFSD_WRITEONLY_ATTRS_WORD1)) 756 || (verify->ve_bmval[1] & NFSD_WRITEONLY_ATTRS_WORD1))