]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: filemap_write_and_wait_range not exported < 2.6.30
authorSage Weil <sage@newdream.net>
Mon, 8 Jun 2009 19:08:49 +0000 (12:08 -0700)
committerSage Weil <sage@newdream.net>
Mon, 8 Jun 2009 19:12:11 +0000 (12:12 -0700)
Include a warning that snap flushing may not work.

src/kernel/inode.c

index 9fe9ae1523c7d287bec726e1c63d17c87c2fc4bb..5473ab6455289f88c59f4d5e04ba346b86978511 100644 (file)
@@ -1272,8 +1272,13 @@ retry:
                dout(10, "__do_pending_vmtruncate %p flushing snaps first\n",
                     inode);
                spin_unlock(&inode->i_lock);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
                filemap_write_and_wait_range(&inode->i_data, 0,
                                             CEPH_FILE_MAX_SIZE);
+#else
+# warning i may not flush all data after a snapshot + truncate.. i export need 2.6.30
+               filemap_write_and_wait(&inode->i_data);
+#endif
                goto retry;
        }