changeset 13952:efa4353d4edf

nfs41: Add CLAIM_FH support for OPEN operation Based on the patch from Jeremy Jones <jjones@vmware.com> Bug #1366 https://www.illumos.org/issues/1366
author Vitaliy Gusev <gusev.vitaliy@nexenta.com>
date Mon, 12 Mar 2012 18:42:56 +0400
parents 3303c520e0db
children c702e1fe80fb
files usr/src/uts/common/fs/nfs/nfs41_srv.c
diffstat 1 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/fs/nfs/nfs41_srv.c	Sat Nov 05 01:15:32 2011 +0300
+++ b/usr/src/uts/common/fs/nfs/nfs41_srv.c	Mon Mar 12 18:42:56 2012 +0400
@@ -5295,6 +5295,17 @@
 
 /*ARGSUSED*/
 static void
+mds_do_openfh(struct compound_state *cs, struct svc_req *req, OPEN4args *args,
+    rfs4_openowner_t *oo, OPEN4res *resp)
+{
+	/* cs->vp and cs->fh have been updated by putfh. */
+	mds_do_open(cs, req, oo, do_41_deleg_hack(args->share_access),
+	    (args->share_access & 0xff), args->share_deny, resp,
+	    0, NULL);
+}
+
+/*ARGSUSED*/
+static void
 mds_do_opennull(struct compound_state *cs,
 		struct svc_req *req,
 		OPEN4args *args,
@@ -5607,7 +5618,8 @@
 
 	/* Grace only applies to regular-type OPENs */
 	if (rfs4_clnt_in_grace(cp) &&
-	    (claim == CLAIM_NULL || claim == CLAIM_DELEGATE_CUR)) {
+	    (claim == CLAIM_NULL || claim == CLAIM_DELEGATE_CUR ||
+	    claim == CLAIM_FH)) {
 		*cs->statusp = resp->status = NFS4ERR_GRACE;
 		goto out;
 	}
@@ -5677,7 +5689,9 @@
 	case CLAIM_DELEGATE_PREV:
 		mds_do_opendelprev(cs, req, args, oo, resp);
 		break;
-	/*  OTHER CLAIM TYPES !!! */
+	case CLAIM_FH:
+		mds_do_openfh(cs, req, args, oo, resp);
+		break;
 	default:
 		resp->status = NFS4ERR_INVAL;
 		break;