Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735651
| From | Miklos Szeredi <mszeredi@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 09/10] orangefs: honor AT_STATX_DONT_SYNC |
| Date | 2017-09-20 10:50 +0200 |
| Message-ID | <urIRI-Bk-39@gated-at.bofh.it> (permalink) |
| References | <urIRH-Bk-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[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
csiph-web