Skip to contentSkip to conversation

honor AT_STATX_DONT_SYNC in netfs

PATCH In review Miklos Szeredi 4 participants 15 messages Sep 20, 2017 – Sep 21, 2017 1 message not in the archive

Subsystems (12)
lore
Share & tools
lore
#0 lore raw

cover honor AT_STATX_DONT_SYNC in netfs

This is pretty simple to do: all netfs getattr implementations consist of two phases:

1) refresh attributes
2) fill in kstat

We just need to omit the first phase if this flag is given.
---
Miklos Szeredi (10):
ceph: honor AT_STATX_DONT_SYNC
cifs: honor AT_STATX_DONT_SYNC
coda: honor AT_STATX_DONT_SYNC
fuse: honor AT_STATX_DONT_SYNC
gfs2: honor AT_STATX_DONT_SYNC
lustre: honor AT_STATX_DONT_SYNC
nfs: honor AT_STATX_DONT_SYNC
ocfs2: honor AT_STATX_DONT_SYNC
orangefs: honor AT_STATX_DONT_SYNC
9p: honor AT_STATX_DONT_SYNC

 drivers/staging/lustre/lustre/llite/file.c | 12 +++++++-----
 fs/9p/vfs_inode.c                          |  4 +++-
 fs/9p/vfs_inode_dotl.c                     |  3 ++-
 fs/ceph/inode.c                            |  6 ++++--
 fs/cifs/inode.c                            | 30 ++++++++++++++++--------------
 fs/coda/inode.c                            |  5 ++++-
 fs/fuse/dir.c                              |  9 +++++----
 fs/gfs2/inode.c                            |  3 ++-
 fs/nfs/inode.c                             |  6 +++++-
 fs/ocfs2/file.c                            | 12 +++++++-----
 fs/orangefs/inode.c                        |  6 ++++--
 11 files changed, 59 insertions(+), 37 deletions(-)
Signature · 1 line
2.5.5
#1 lore raw

PATCH 1/10 ceph: honor AT_STATX_DONT_SYNC

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.

Cc Ilya Dryomov <[email protected]>
Cc "Yan, Zheng" <[email protected]>
Cc Sage Weil <[email protected]>
---
 fs/ceph/inode.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
fs/ceph/inode.c +4 -2
index 373dab5173ca..723002f6b060 100644
@@ -2201,9 +2201,11 @@ int ceph_getattr(const struct path *path, struct kstat *stat,
 {
 	struct inode *inode = d_inode(path->dentry);
 	struct ceph_inode_info *ci = ceph_inode(inode);
-	int err;
+	int err = 0;
+
+	if (!(flags & AT_STATX_DONT_SYNC))
+		err = ceph_do_getattr(inode, CEPH_STAT_CAP_INODE_ALL, false);
 
-	err = ceph_do_getattr(inode, CEPH_STAT_CAP_INODE_ALL, false);
 	if (!err) {
 		generic_fillattr(inode, stat);
 		stat->ino = ceph_translate_ino(inode->i_sb, inode->i_ino);
Signature · 1 line
2.5.5
#2 lore raw

PATCH 2/10 cifs: honor AT_STATX_DONT_SYNC

In reply to Miklos Szeredi

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.

---
 fs/cifs/inode.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)
fs/cifs/inode.c +16 -14
index a8693632235f..982ba2e4f549 100644
@@ -2003,22 +2003,24 @@ int cifs_getattr(const struct path *path, struct kstat *stat,
 	struct inode *inode = d_inode(dentry);
 	int rc;
 
-	/*
-	 * We need to be sure that all dirty pages are written and the server
-	 * has actual ctime, mtime and file length.
-	 */
-	if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
-	    inode->i_mapping->nrpages != 0) {
-		rc = filemap_fdatawait(inode->i_mapping);
-		if (rc) {
-			mapping_set_error(inode->i_mapping, rc);
-			return rc;
+	if (!(flags & AT_STATX_DONT_SYNC)) {
+		/*
+		 * We need to be sure that all dirty pages are written and the
+		 * server has actual ctime, mtime and file length.
+		 */
+		if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
+		    inode->i_mapping->nrpages != 0) {
+			rc = filemap_fdatawait(inode->i_mapping);
+			if (rc) {
+				mapping_set_error(inode->i_mapping, rc);
+				return rc;
+			}
 		}
-	}
 
-	rc = cifs_revalidate_dentry_attr(dentry);
-	if (rc)
-		return rc;
+		rc = cifs_revalidate_dentry_attr(dentry);
+		if (rc)
+			return rc;
+	}
 
 	generic_fillattr(inode, stat);
 	stat->blksize = CIFS_MAX_MSGSIZE;
Signature · 1 line
2.5.5
#3 lore raw

Re: [PATCH 02/10] cifs: honor AT_STATX_DONT_SYNC

Do you have any sample program/code to query with this flag?

Quoted 56 lines · Miklos Szeredi

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.

---
 fs/cifs/inode.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)
fs/cifs/inode.c +16 -15
index a8693632235f..982ba2e4f549 100644
@@ -2003,22 +2003,24 @@ int cifs_getattr(const struct path *path, struct kstat *stat,
        struct inode *inode = d_inode(dentry);
        int rc;
 
-       /*
-        * We need to be sure that all dirty pages are written and the server
-        * has actual ctime, mtime and file length.
-        */
-       if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
-           inode->i_mapping->nrpages != 0) {
-               rc = filemap_fdatawait(inode->i_mapping);
-               if (rc) {
-                       mapping_set_error(inode->i_mapping, rc);
-                       return rc;
+       if (!(flags & AT_STATX_DONT_SYNC)) {
+               /*
+                * We need to be sure that all dirty pages are written and the
+                * server has actual ctime, mtime and file length.
+                */
+               if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
+                   inode->i_mapping->nrpages != 0) {
+                       rc = filemap_fdatawait(inode->i_mapping);
+                       if (rc) {
+                               mapping_set_error(inode->i_mapping, rc);
+                               return rc;
+                       }
                }
-       }
 
-       rc = cifs_revalidate_dentry_attr(dentry);
-       if (rc)
-               return rc;
+               rc = cifs_revalidate_dentry_attr(dentry);
+               if (rc)
+                       return rc;
+       }
 
        generic_fillattr(inode, stat);
        stat->blksize = CIFS_MAX_MSGSIZE;
--

2.5.5

Signature · 3 lines
Thanks,

Steve

A message that is not in the archive (sent off-list or not yet received): CAH2r5mtNGzVsoKw49zxButMNfwTtx1H4CFe9o9=mCxhCHZVFuw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#5 lore raw

PATCH 2/10 cifs: honor AT_STATX_DONT_SYNC

Adding linux-cifs to cc

---------- Forwarded message ----------
From: Steve French <[email protected]>
Date: Thu, Sep 21, 2017 at 1:14 PM
Subject: Re: [PATCH 02/10] cifs: honor AT_STATX_DONT_SYNC
To: Miklos Szeredi <[email protected]>
Cc: linux-fsdevel <[email protected]>, LKML <[email protected]>, Al Viro <viro-RmSDqhL/[email protected]>, David Howells <[email protected]>, Steve French <[email protected]>

Do you have any sample program/code to query with this flag?

Quoted 54 lines · Miklos Szeredi

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.

---
 fs/cifs/inode.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)
fs/cifs/inode.c +16 -15
index a8693632235f..982ba2e4f549 100644
@@ -2003,22 +2003,24 @@ int cifs_getattr(const struct path *path, struct kstat *stat,
        struct inode *inode = d_inode(dentry);
        int rc;
 
-       /*
-        * We need to be sure that all dirty pages are written and the server
-        * has actual ctime, mtime and file length.
-        */
-       if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
-           inode->i_mapping->nrpages != 0) {
-               rc = filemap_fdatawait(inode->i_mapping);
-               if (rc) {
-                       mapping_set_error(inode->i_mapping, rc);
-                       return rc;
+       if (!(flags & AT_STATX_DONT_SYNC)) {
+               /*
+                * We need to be sure that all dirty pages are written and the
+                * server has actual ctime, mtime and file length.
+                */
+               if (!CIFS_CACHE_READ(CIFS_I(inode)) && inode->i_mapping &&
+                   inode->i_mapping->nrpages != 0) {
+                       rc = filemap_fdatawait(inode->i_mapping);
+                       if (rc) {
+                               mapping_set_error(inode->i_mapping, rc);
+                               return rc;
+                       }
                }
-       }
 
-       rc = cifs_revalidate_dentry_attr(dentry);
-       if (rc)
-               return rc;
+               rc = cifs_revalidate_dentry_attr(dentry);
+               if (rc)
+                       return rc;
+       }
 
        generic_fillattr(inode, stat);
        stat->blksize = CIFS_MAX_MSGSIZE;
--
Quoted 2 lines

2.5.5

--
Thanks,

Steve

Signature · 3 lines
Thanks,

Steve
#6 lore raw

PATCH 3/10 coda: honor AT_STATX_DONT_SYNC

In reply to Miklos Szeredi

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.

---
 fs/coda/inode.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/coda/inode.c +4 -1
index 6058df380cc0..734672b2cbdc 100644
@@ -255,7 +255,10 @@ static void coda_evict_inode(struct inode *inode)
 int coda_getattr(const struct path *path, struct kstat *stat,
 		 u32 request_mask, unsigned int flags)
 {
-	int err = coda_revalidate_inode(d_inode(path->dentry));
+	int err = 0;
+
+	if (!(flags & AT_STATX_DONT_SYNC))
+		err = coda_revalidate_inode(d_inode(path->dentry));
 	if (!err)
 		generic_fillattr(d_inode(path->dentry), stat);
 	return err;
Signature · 1 line
2.5.5
maintainer
#7 lore raw

Re: [PATCH 03/10] coda: honor AT_STATX_DONT_SYNC

Quoted 3 lines · Miklos Szeredi

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.

What is the use case for this AT_STATX_DONT_SYNC flag?

I'm asking because the Coda userspace client potentially has attributes that are not cached in the kernel but can be (re-)validated without network communication. So if we just care about avoiding network traffic we could propagate the flag up to userspace. If we want to avoid context switches, disk I/O and only check on what happens to be cached in the kernel the current approach works fine.

Jan

Quoted 26 lines
---
 fs/coda/inode.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/coda/inode.c +4 -1
index 6058df380cc0..734672b2cbdc 100644
@@ -255,7 +255,10 @@ static void coda_evict_inode(struct inode *inode)
 int coda_getattr(const struct path *path, struct kstat *stat,
 		 u32 request_mask, unsigned int flags)
 {
-	int err = coda_revalidate_inode(d_inode(path->dentry));
+	int err = 0;
+
+	if (!(flags & AT_STATX_DONT_SYNC))
+		err = coda_revalidate_inode(d_inode(path->dentry));
 	if (!err)
 		generic_fillattr(d_inode(path->dentry), stat);
 	return err;
Signature · 1 line
2.5.5
#8 lore raw

Re: [PATCH 03/10] coda: honor AT_STATX_DONT_SYNC

Quoted 5 lines · Jan Harkes
Quoted 3 lines · Miklos Szeredi

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.

Quoted 8 lines

What is the use case for this AT_STATX_DONT_SYNC flag?

I'm asking because the Coda userspace client potentially has attributes that are not cached in the kernel but can be (re-)validated without network communication. So if we just care about avoiding network traffic we could propagate the flag up to userspace. If we want to avoid context switches, disk I/O and only check on what happens to be cached in the kernel the current approach works fine.

It's an interesting question, "server" could mean several different things depending on the context. I interpreted it as "any entity outside the kernel the filesystem resides in", mainly because it's the simplest interpretation.

Thanks,
Miklos

Quoted 26 lines
Quoted 26 lines
---
 fs/coda/inode.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/coda/inode.c +4 -2
index 6058df380cc0..734672b2cbdc 100644
@@ -255,7 +255,10 @@ static void coda_evict_inode(struct inode *inode)
 int coda_getattr(const struct path *path, struct kstat *stat,
               u32 request_mask, unsigned int flags)
 {
-     int err = coda_revalidate_inode(d_inode(path->dentry));
+     int err = 0;
+
+     if (!(flags & AT_STATX_DONT_SYNC))
+             err = coda_revalidate_inode(d_inode(path->dentry));
      if (!err)
              generic_fillattr(d_inode(path->dentry), stat);
      return err;
--

2.5.5

#9 lore raw

PATCH 4/10 fuse: honor AT_STATX_DONT_SYNC

In reply to Miklos Szeredi

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.

---
 fs/fuse/dir.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
fs/fuse/dir.c +5 -4
index 622081b97426..d2d1dbe1ef75 100644
@@ -924,12 +924,13 @@ static int fuse_do_getattr(struct inode *inode, struct kstat *stat,
 }
 
 static int fuse_update_get_attr(struct inode *inode, struct file *file,
-				struct kstat *stat)
+				struct kstat *stat, unsigned int flags)
 {
 	struct fuse_inode *fi = get_fuse_inode(inode);
 	int err = 0;
 
-	if (time_before64(fi->i_time, get_jiffies_64())) {
+	if (!(flags & AT_STATX_DONT_SYNC) &&
+	    time_before64(fi->i_time, get_jiffies_64())) {
 		forget_all_cached_acls(inode);
 		err = fuse_do_getattr(inode, stat, file);
 	} else if (stat) {
@@ -943,7 +944,7 @@ static int fuse_update_get_attr(struct inode *inode, struct file *file,
 
 int fuse_update_attributes(struct inode *inode, struct file *file)
 {
-	return fuse_update_get_attr(inode, file, NULL);
+	return fuse_update_get_attr(inode, file, NULL, 0);
 }
 
 int fuse_reverse_inval_entry(struct super_block *sb, u64 parent_nodeid,
@@ -1782,7 +1783,7 @@ static int fuse_getattr(const struct path *path, struct kstat *stat,
 	if (!fuse_allow_current_process(fc))
 		return -EACCES;
 
-	return fuse_update_get_attr(inode, NULL, stat);
+	return fuse_update_get_attr(inode, NULL, stat, flags);
 }
 
 static const struct inode_operations fuse_dir_inode_operations = {
Signature · 1 line
2.5.5
#10 lore raw

PATCH 5/10 gfs2: honor AT_STATX_DONT_SYNC

In reply to Miklos Szeredi

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.

Cc Bob Peterson <[email protected]>
Cc Steven Whitehouse <[email protected]>
---
 fs/gfs2/inode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/gfs2/inode.c +2 -1
index 863749e29bf9..c59d36a3b724 100644
@@ -1989,7 +1989,8 @@ static int gfs2_getattr(const struct path *path, struct kstat *stat,
 	int error;
 
 	gfs2_holder_mark_uninitialized(&gh);
-	if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) {
+	if (!(flags & AT_STATX_DONT_SYNC) &&
+	    gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) {
 		error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh);
 		if (error)
 			return error;
Signature · 1 line
2.5.5
#11 lore raw

PATCH 6/10 lustre: honor AT_STATX_DONT_SYNC

In reply to Miklos Szeredi

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.

Cc Oleg Drokin <[email protected]>
Cc Andreas Dilger <[email protected]>
Cc James Simmons <[email protected]>
---
 drivers/staging/lustre/lustre/llite/file.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/staging/lustre/lustre/llite/file.c +7 -5
index be665454f407..decbe5eb0c9d 100644
@@ -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))
Signature · 1 line
2.5.5
#12 lore raw

PATCH 7/10 nfs: honor AT_STATX_DONT_SYNC

In reply to Miklos Szeredi

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.

Cc Trond Myklebust <[email protected]>
Cc Anna Schumaker <[email protected]>
---
 fs/nfs/inode.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fs/nfs/inode.c +5 -1
index 134d9f560240..487e99ba7d33 100644
@@ -739,6 +739,10 @@ int nfs_getattr(const struct path *path, struct kstat *stat,
 	int err = 0;
 
 	trace_nfs_getattr_enter(inode);
+
+	if (query_flags & AT_STATX_DONT_SYNC)
+		goto out;
+
 	/* Flush out writes to the server in order to update c/mtime.  */
 	if (S_ISREG(inode->i_mode)) {
 		err = filemap_write_and_wait(inode->i_mapping);
@@ -769,13 +773,13 @@ int nfs_getattr(const struct path *path, struct kstat *stat,
 		err = __nfs_revalidate_inode(server, inode);
 	} else
 		nfs_readdirplus_parent_cache_hit(path->dentry);
+out:
 	if (!err) {
 		generic_fillattr(inode, stat);
 		stat->ino = nfs_compat_user_ino64(NFS_FILEID(inode));
 		if (S_ISDIR(inode->i_mode))
 			stat->blksize = NFS_SERVER(inode)->dtsize;
 	}
-out:
 	trace_nfs_getattr_exit(inode, err);
 	return err;
 }
Signature · 1 line
2.5.5
#13 lore raw

PATCH 8/10 ocfs2: honor AT_STATX_DONT_SYNC

In reply to Miklos Szeredi

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.

Cc Mark Fasheh <[email protected]>
Cc Joel Becker <[email protected]>
---
 fs/ocfs2/file.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
fs/ocfs2/file.c +7 -5
index 6e41fc8fabbe..2d248d71c275 100644
@@ -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);
Signature · 1 line
2.5.5
#14 lore raw

PATCH 9/10 orangefs: honor AT_STATX_DONT_SYNC

In reply to Miklos Szeredi

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.

---
 fs/orangefs/inode.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
fs/orangefs/inode.c +4 -2
index 9428ea0aac16..1b3c4c4dd3d4 100644
@@ -247,7 +247,7 @@ int orangefs_setattr(struct dentry *dentry, struct iattr *iattr)
 int orangefs_getattr(const struct path *path, struct kstat *stat,
 		     u32 request_mask, unsigned int flags)
 {
-	int ret = -ENOENT;
+	int ret = 0;
 	struct inode *inode = path->dentry->d_inode;
 	struct orangefs_inode_s *orangefs_inode = NULL;
 
@@ -255,7 +255,9 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
 		     "orangefs_getattr: called on %pd\n",
 		     path->dentry);
 
-	ret = orangefs_inode_getattr(inode, 0, 0, request_mask);
+	if (!(flags & AT_STATX_DONT_SYNC))
+		ret = orangefs_inode_getattr(inode, 0, 0, request_mask);
+
 	if (ret == 0) {
 		generic_fillattr(inode, stat);
 
Signature · 1 line
2.5.5
#15 lore raw

PATCH 10/10 9p: honor AT_STATX_DONT_SYNC

In reply to Miklos Szeredi

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.

Cc Eric Van Hensbergen <[email protected]>
Cc Ron Minnich <[email protected]>
Cc Latchesar Ionkov <[email protected]>
---
 fs/9p/vfs_inode.c      | 4 +++-
 fs/9p/vfs_inode_dotl.c | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
fs/9p/vfs_inode.c +3 -1
index 2a5de610dd8f..0a7063f12c0b 100644
@@ -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;
 	}
fs/9p/vfs_inode_dotl.c +2 -1
index 70f9887c59a9..92bf43981a0d 100644
@@ -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;
 	}
Signature · 1 line
2.5.5