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


Groups > linux.kernel > #1735650 > unrolled thread

[PATCH 00/10] honor AT_STATX_DONT_SYNC in netfs

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

Back to article view | Back to linux.kernel


Contents

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

#1735650 — [PATCH 00/10] honor AT_STATX_DONT_SYNC in netfs

FromMiklos Szeredi <mszeredi@redhat.com>
Date2017-09-20 10:50 +0200
Subject[PATCH 00/10] honor AT_STATX_DONT_SYNC in netfs
Message-ID<urIRH-Bk-5@gated-at.bofh.it>
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(-)

-- 
2.5.5

[toc] | [next] | [standalone]


#1735651 — [PATCH 09/10] orangefs: honor AT_STATX_DONT_SYNC

FromMiklos Szeredi <mszeredi@redhat.com>
Date2017-09-20 10:50 +0200
Subject[PATCH 09/10] orangefs: honor AT_STATX_DONT_SYNC
Message-ID<urIRI-Bk-39@gated-at.bofh.it>
In reply to#1735650
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: Mike Marshall <hubcap@omnibond.com>
---
 fs/orangefs/inode.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 9428ea0aac16..1b3c4c4dd3d4 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -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);
 
-- 
2.5.5

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web