All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@primarydata.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 3/5] NFSv4: Don't request a GETATTR on open_downgrade.
Date: Thu,  1 Dec 2016 17:06:30 -0500	[thread overview]
Message-ID: <20161201220632.12754-4-trond.myklebust@primarydata.com> (raw)
In-Reply-To: <20161201220632.12754-3-trond.myklebust@primarydata.com>

If we're not closing the file completely, there is no need to request
close-to-open attributes.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/nfs4xdr.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index fc89e5ed07ee..c37473721230 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -499,14 +499,12 @@ static int nfs4_stat_to_errno(int);
 				(compound_encode_hdr_maxsz + \
 				 encode_sequence_maxsz + \
 				 encode_putfh_maxsz + \
-				 encode_open_downgrade_maxsz + \
-				 encode_getattr_maxsz)
+				 encode_open_downgrade_maxsz)
 #define NFS4_dec_open_downgrade_sz \
 				(compound_decode_hdr_maxsz + \
 				 decode_sequence_maxsz + \
 				 decode_putfh_maxsz + \
-				 decode_open_downgrade_maxsz + \
-				 decode_getattr_maxsz)
+				 decode_open_downgrade_maxsz)
 #define NFS4_enc_close_sz	(compound_encode_hdr_maxsz + \
 				 encode_sequence_maxsz + \
 				 encode_putfh_maxsz + \
@@ -2328,7 +2326,6 @@ static void nfs4_xdr_enc_open_downgrade(struct rpc_rqst *req,
 	encode_sequence(xdr, &args->seq_args, &hdr);
 	encode_putfh(xdr, args->fh, &hdr);
 	encode_open_downgrade(xdr, args, &hdr);
-	encode_getfattr(xdr, args->bitmask, &hdr);
 	encode_nops(&hdr);
 }
 
@@ -6115,9 +6112,6 @@ static int nfs4_xdr_dec_open_downgrade(struct rpc_rqst *rqstp,
 	if (status)
 		goto out;
 	status = decode_open_downgrade(xdr, res);
-	if (status != 0)
-		goto out;
-	decode_getfattr(xdr, res->fattr, res->server);
 out:
 	return status;
 }
-- 
2.9.3


  reply	other threads:[~2016-12-01 22:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01 22:06 [PATCH 0/5] Performance optimsations for 4.10 Trond Myklebust
2016-12-01 22:06 ` [PATCH 1/5] NFSv4: Don't check file access when reclaiming state Trond Myklebust
2016-12-01 22:06   ` [PATCH 2/5] NFSv4: Don't ask for the change attribute " Trond Myklebust
2016-12-01 22:06     ` Trond Myklebust [this message]
2016-12-01 22:06       ` [PATCH 4/5] NFSv4: Don't request close-to-open attribute when holding a delegation Trond Myklebust
2016-12-01 22:06         ` [PATCH 5/5] NFSv4: Optimise away forced revalidation when we know the attributes are OK Trond Myklebust
2016-12-02 17:05     ` [PATCH 2/5] NFSv4: Don't ask for the change attribute when reclaiming state Anna Schumaker
2016-12-02 17:28       ` Trond Myklebust
2016-12-02 17:47         ` Anna Schumaker
  -- strict thread matches above, loose matches on Subject: below --
2016-11-10 21:41 [PATCH 0/5] Optimisations for state management Trond Myklebust
2016-11-10 21:41 ` [PATCH 1/5] NFSv4: Don't check file access when reclaiming state Trond Myklebust
2016-11-10 21:41   ` [PATCH 2/5] NFSv4: Don't ask for the change attribute " Trond Myklebust
2016-11-10 21:41     ` [PATCH 3/5] NFSv4: Don't request a GETATTR on open_downgrade Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161201220632.12754-4-trond.myklebust@primarydata.com \
    --to=trond.myklebust@primarydata.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.