From: Miklos Szeredi <mszeredi@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
David Howells <dhowells@redhat.com>,
Oleg Drokin <oleg.drokin@intel.com>,
Andreas Dilger <andreas.dilger@intel.com>,
James Simmons <jsimmons@infradead.org>
Subject: [PATCH 06/10] lustre: honor AT_STATX_DONT_SYNC
Date: Wed, 20 Sep 2017 10:40:01 +0200 [thread overview]
Message-ID: <1505896805-12055-7-git-send-email-mszeredi@redhat.com> (raw)
In-Reply-To: <1505896805-12055-1-git-send-email-mszeredi@redhat.com>
The description of this flag says "Don't sync attributes with the server".
In other words: always use the attributes cached in the kernel and don't
send network or local messages to refresh the attributes.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: James Simmons <jsimmons@infradead.org>
---
drivers/staging/lustre/lustre/llite/file.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index be665454f407..decbe5eb0c9d 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -2955,14 +2955,16 @@ int ll_getattr(const struct path *path, struct kstat *stat,
struct ll_inode_info *lli = ll_i2info(inode);
int res;
- res = ll_inode_revalidate(path->dentry,
+ if (!(flags & AT_STATX_DONT_SYNC)) {
+ res = ll_inode_revalidate(path->dentry,
MDS_INODELOCK_UPDATE | MDS_INODELOCK_LOOKUP);
- ll_stats_ops_tally(sbi, LPROC_LL_GETATTR, 1);
+ ll_stats_ops_tally(sbi, LPROC_LL_GETATTR, 1);
- if (res)
- return res;
+ if (res)
+ return res;
- OBD_FAIL_TIMEOUT(OBD_FAIL_GETATTR_DELAY, 30);
+ OBD_FAIL_TIMEOUT(OBD_FAIL_GETATTR_DELAY, 30);
+ }
stat->dev = inode->i_sb->s_dev;
if (ll_need_32bit_api(sbi))
--
2.5.5
next prev parent reply other threads:[~2017-09-20 8:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 8:39 [PATCH 00/10] honor AT_STATX_DONT_SYNC in netfs Miklos Szeredi
2017-09-20 8:39 ` [PATCH 01/10] ceph: honor AT_STATX_DONT_SYNC Miklos Szeredi
2017-09-20 8:39 ` [PATCH 02/10] cifs: " Miklos Szeredi
2017-09-21 18:14 ` Steve French
2017-09-20 8:39 ` [PATCH 03/10] coda: " Miklos Szeredi
2017-09-20 20:04 ` Jan Harkes
2017-09-21 12:45 ` Miklos Szeredi
2017-09-20 8:39 ` [PATCH 04/10] fuse: " Miklos Szeredi
2017-09-20 8:40 ` [PATCH 05/10] gfs2: " Miklos Szeredi
2017-09-20 8:40 ` Miklos Szeredi [this message]
2017-09-20 8:40 ` [PATCH 07/10] nfs: " Miklos Szeredi
2017-09-20 8:40 ` [PATCH 08/10] ocfs2: " Miklos Szeredi
2017-09-20 8:40 ` [PATCH 09/10] orangefs: " Miklos Szeredi
2017-09-20 8:40 ` [PATCH 10/10] 9p: " Miklos Szeredi
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=1505896805-12055-7-git-send-email-mszeredi@redhat.com \
--to=mszeredi@redhat.com \
--cc=andreas.dilger@intel.com \
--cc=dhowells@redhat.com \
--cc=jsimmons@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.com \
--cc=viro@zeniv.linux.org.uk \
/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).