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


Groups > linux.kernel > #1735644 > unrolled thread

[PATCH 08/10] ocfs2: 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 08/10] ocfs2: honor AT_STATX_DONT_SYNC Miklos Szeredi <mszeredi@redhat.com> - 2017-09-20 10:50 +0200

#1735644 — [PATCH 08/10] ocfs2: honor AT_STATX_DONT_SYNC

FromMiklos Szeredi <mszeredi@redhat.com>
Date2017-09-20 10:50 +0200
Subject[PATCH 08/10] ocfs2: honor AT_STATX_DONT_SYNC
Message-ID<urIRI-Bk-25@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: Mark Fasheh <mfasheh@versity.com>
Cc: Joel Becker <jlbec@evilplan.org>
---
 fs/ocfs2/file.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 6e41fc8fabbe..2d248d71c275 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1307,11 +1307,13 @@ int ocfs2_getattr(const struct path *path, struct kstat *stat,
 	struct ocfs2_super *osb = sb->s_fs_info;
 	int err;
 
-	err = ocfs2_inode_revalidate(path->dentry);
-	if (err) {
-		if (err != -ENOENT)
-			mlog_errno(err);
-		goto bail;
+	if (!(flags & AT_STATX_DONT_SYNC)) {
+		err = ocfs2_inode_revalidate(path->dentry);
+		if (err) {
+			if (err != -ENOENT)
+				mlog_errno(err);
+			goto bail;
+		}
 	}
 
 	generic_fillattr(inode, stat);
-- 
2.5.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web