nfs4.1: Add SP4_MACH_CRED write and commit support

WRITE and COMMIT can use the machine credential.

If WRITE is supported and COMMIT is not, make all (mach cred) writes FILE_SYNC4.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Weston Andros Adamson
2013-08-13 16:37:37 -04:00
committed by Trond Myklebust
parent 3787d5063c
commit 8c21c62c44
4 changed files with 59 additions and 9 deletions

View File

@@ -6223,6 +6223,16 @@ static int nfs4_sp4_select_mode(struct nfs_client *clp,
dfprintk(MOUNT, " stateid mode enabled\n");
set_bit(NFS_SP4_MACH_CRED_STATEID, &clp->cl_sp4_flags);
}
if (test_bit(OP_WRITE, sp->allow.u.longs)) {
dfprintk(MOUNT, " write mode enabled\n");
set_bit(NFS_SP4_MACH_CRED_WRITE, &clp->cl_sp4_flags);
}
if (test_bit(OP_COMMIT, sp->allow.u.longs)) {
dfprintk(MOUNT, " commit mode enabled\n");
set_bit(NFS_SP4_MACH_CRED_COMMIT, &clp->cl_sp4_flags);
}
}
return 0;