Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735638 > unrolled thread
| Started by | Miklos Szeredi <mszeredi@redhat.com> |
|---|---|
| First post | 2017-09-20 10:50 +0200 |
| Last post | 2017-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.
[PATCH 01/10] ceph: honor AT_STATX_DONT_SYNC Miklos Szeredi <mszeredi@redhat.com> - 2017-09-20 10:50 +0200
| From | Miklos Szeredi <mszeredi@redhat.com> |
|---|---|
| Date | 2017-09-20 10:50 +0200 |
| Subject | [PATCH 01/10] ceph: honor AT_STATX_DONT_SYNC |
| Message-ID | <urIRH-Bk-9@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: Ilya Dryomov <idryomov@gmail.com>
Cc: "Yan, Zheng" <zyan@redhat.com>
Cc: Sage Weil <sage@redhat.com>
---
fs/ceph/inode.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 373dab5173ca..723002f6b060 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -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);
--
2.5.5
Back to top | Article view | linux.kernel
csiph-web