Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1735642 > unrolled thread

[PATCH 10/10] 9p: honor AT_STATX_DONT_SYNC

Started byMiklos Szeredi <mszeredi@redhat.com>
First post2017-09-20 10:50 +0200
Last post2017-09-20 10:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 10/10] 9p: honor AT_STATX_DONT_SYNC Miklos Szeredi <mszeredi@redhat.com> - 2017-09-20 10:50 +0200

#1735642 — [PATCH 10/10] 9p: honor AT_STATX_DONT_SYNC

FromMiklos Szeredi <mszeredi@redhat.com>
Date2017-09-20 10:50 +0200
Subject[PATCH 10/10] 9p: honor AT_STATX_DONT_SYNC
Message-ID<urIRH-Bk-19@gated-at.bofh.it>
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: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
---
 fs/9p/vfs_inode.c      | 4 +++-
 fs/9p/vfs_inode_dotl.c | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 2a5de610dd8f..0a7063f12c0b 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -1065,7 +1065,9 @@ v9fs_vfs_getattr(const struct path *path, struct kstat *stat,
 
 	p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
 	v9ses = v9fs_dentry2v9ses(dentry);
-	if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
+
+	if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE ||
+	    (flags & AT_STATX_DONT_SYNC)) {
 		generic_fillattr(d_inode(dentry), stat);
 		return 0;
 	}
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 70f9887c59a9..92bf43981a0d 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -478,7 +478,8 @@ v9fs_vfs_getattr_dotl(const struct path *path, struct kstat *stat,
 
 	p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
 	v9ses = v9fs_dentry2v9ses(dentry);
-	if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
+	if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE ||
+	    (flags & AT_STATX_DONT_SYNC)) {
 		generic_fillattr(d_inode(dentry), stat);
 		return 0;
 	}
-- 
2.5.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web