aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/super.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index d80699a4dc26..7f751f2850ba 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -102,12 +102,21 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
102} 102}
103 103
104 104
105static int ceph_syncfs(struct super_block *sb, int wait) 105static int ceph_sync_fs(struct super_block *sb, int wait)
106{ 106{
107 dout("sync_fs %d\n", wait); 107 struct ceph_client *client = ceph_sb_to_client(sb);
108
109 if (!wait) {
110 dout("sync_fs (non-blocking)\n");
111 ceph_flush_dirty_caps(&client->mdsc);
112 dout("sync_fs (non-blocking) done\n");
113 return 0;
114 }
115
116 dout("sync_fs (blocking)\n");
108 ceph_osdc_sync(&ceph_sb_to_client(sb)->osdc); 117 ceph_osdc_sync(&ceph_sb_to_client(sb)->osdc);
109 ceph_mdsc_sync(&ceph_sb_to_client(sb)->mdsc); 118 ceph_mdsc_sync(&ceph_sb_to_client(sb)->mdsc);
110 dout("sync_fs %d done\n", wait); 119 dout("sync_fs (blocking) done\n");
111 return 0; 120 return 0;
112} 121}
113 122
@@ -278,7 +287,7 @@ static const struct super_operations ceph_super_ops = {
278 .alloc_inode = ceph_alloc_inode, 287 .alloc_inode = ceph_alloc_inode,
279 .destroy_inode = ceph_destroy_inode, 288 .destroy_inode = ceph_destroy_inode,
280 .write_inode = ceph_write_inode, 289 .write_inode = ceph_write_inode,
281 .sync_fs = ceph_syncfs, 290 .sync_fs = ceph_sync_fs,
282 .put_super = ceph_put_super, 291 .put_super = ceph_put_super,
283 .show_options = ceph_show_options, 292 .show_options = ceph_show_options,
284 .statfs = ceph_statfs, 293 .statfs = ceph_statfs,