summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.h
diff options
context:
space:
mode:
authorYan, Zheng2015-10-27 11:36:06 +0100
committerIlya Dryomov2015-11-02 23:36:48 +0100
commit68cd5b4b7612c2956d8553dfb39490b29f32566d (patch)
treee66461c4e1241a3dc5797a650a16683470185140 /fs/ceph/mds_client.h
parentceph: add request to i_unsafe_dirops when getting unsafe reply (diff)
downloadkernel-qcow2-linux-68cd5b4b7612c2956d8553dfb39490b29f32566d.tar.gz
kernel-qcow2-linux-68cd5b4b7612c2956d8553dfb39490b29f32566d.tar.xz
kernel-qcow2-linux-68cd5b4b7612c2956d8553dfb39490b29f32566d.zip
ceph: make fsync() wait unsafe requests that created/modified inode
If we get a unsafe reply for request that created/modified inode, add the unsafe request to a list in the newly created/modified inode. So we can make fsync() wait these unsafe requests. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r--fs/ceph/mds_client.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index f575eafe2261..ccf11ef0ca87 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -236,6 +236,9 @@ struct ceph_mds_request {
struct inode *r_unsafe_dir;
struct list_head r_unsafe_dir_item;
+ /* unsafe requests that modify the target inode */
+ struct list_head r_unsafe_target_item;
+
struct ceph_mds_session *r_session;
int r_attempts; /* resend attempts */