linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@gmail.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 03/11] NFSv4: Don't ask for delegated attributes when revalidating the inode
Date: Mon,  4 Jun 2018 18:31:21 -0400	[thread overview]
Message-ID: <20180604223129.121477-3-trond.myklebust@hammerspace.com> (raw)
In-Reply-To: <20180604223129.121477-2-trond.myklebust@hammerspace.com>

From: Trond Myklebust <trond.myklebust@primarydata.com>

Again, when revalidating the inode, we don't need to ask for attributes
for which we are authoritative.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/nfs4proc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index cd60e8360ef2..744a6367618d 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3832,9 +3832,10 @@ static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
 				struct nfs_fattr *fattr, struct nfs4_label *label,
 				struct inode *inode)
 {
+	__u32 bitmask[NFS4_BITMASK_SZ];
 	struct nfs4_getattr_arg args = {
 		.fh = fhandle,
-		.bitmask = server->attr_bitmask,
+		.bitmask = bitmask,
 	};
 	struct nfs4_getattr_res res = {
 		.fattr = fattr,
@@ -3847,7 +3848,7 @@ static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
 		.rpc_resp = &res,
 	};
 
-	args.bitmask = nfs4_bitmask(server, label);
+	nfs4_bitmap_copy_adjust(bitmask, nfs4_bitmask(server, label), inode);
 
 	nfs_fattr_init(fattr);
 	return nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
-- 
2.17.1


  reply	other threads:[~2018-06-04 22:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04 22:31 [PATCH 01/11] NFSv4: Don't request size+change attribute if they are delegated to us Trond Myklebust
2018-06-04 22:31 ` [PATCH 02/11] NFS: Pass the inode down to the getattr() callback Trond Myklebust
2018-06-04 22:31   ` Trond Myklebust [this message]
2018-06-04 22:31     ` [PATCH 04/11] NFSv4: Don't ask for delegated attributes when adding a hard link Trond Myklebust
2018-06-04 22:31       ` [PATCH 05/11] NFSv4: Ignore NFS_INO_REVAL_FORCED in nfs4_proc_access Trond Myklebust
2018-06-04 22:31         ` [PATCH 06/11] NFSv4: Ensure the inode is clean when we set a delegation Trond Myklebust
2018-06-04 22:31           ` [PATCH 07/11] NFS: fix up nfs_setattr_update_inode Trond Myklebust
2018-06-04 22:31             ` [PATCH 08/11] NFS: Fix attribute revalidation Trond Myklebust
2018-06-04 22:31               ` [PATCH 09/11] NFS: Improve caching while holding a delegation Trond Myklebust
2018-06-04 22:31                 ` [PATCH 10/11] NFS: Ignore NFS_INO_REVAL_FORCED in nfs_check_inode_attributes() Trond Myklebust
2018-06-04 22:31                   ` [PATCH 11/11] NFS: Filter cache invalidation when holding a delegation 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=20180604223129.121477-3-trond.myklebust@hammerspace.com \
    --to=trondmy@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).