ceph: use fscache as a local presisent cache
[deliverable/linux.git] / fs / ceph / super.h
index f1e4e4766ea2d8cabf6126cd59a98f4568517895..bb23ef6361778d8c8635b965098c065979ef318b 100644 (file)
 
 #include <linux/ceph/libceph.h>
 
+#ifdef CONFIG_CEPH_FSCACHE
+#include <linux/fscache.h>
+#endif
+
 /* f_type in struct statfs */
 #define CEPH_SUPER_MAGIC 0x00c36400
 
@@ -29,6 +33,7 @@
 #define CEPH_MOUNT_OPT_NOASYNCREADDIR  (1<<7) /* no dcache readdir */
 #define CEPH_MOUNT_OPT_INO32           (1<<8) /* 32 bit inos */
 #define CEPH_MOUNT_OPT_DCACHE          (1<<9) /* use dcache for readdir etc */
+#define CEPH_MOUNT_OPT_FSCACHE         (1<<10) /* use fscache */
 
 #define CEPH_MOUNT_OPT_DEFAULT    (CEPH_MOUNT_OPT_RBYTES)
 
@@ -90,6 +95,11 @@ struct ceph_fs_client {
        struct dentry *debugfs_bdi;
        struct dentry *debugfs_mdsc, *debugfs_mdsmap;
 #endif
+
+#ifdef CONFIG_CEPH_FSCACHE
+       struct fscache_cookie *fscache;
+       struct workqueue_struct *revalidate_wq;
+#endif
 };
 
 
@@ -320,6 +330,12 @@ struct ceph_inode_info {
 
        struct work_struct i_vmtruncate_work;
 
+#ifdef CONFIG_CEPH_FSCACHE
+       struct fscache_cookie *fscache;
+       u32 i_fscache_gen; /* sequence, for delayed fscache validate */
+       struct work_struct i_revalidate_work;
+#endif
+
        struct inode vfs_inode; /* at end */
 };
 
This page took 0.023932 seconds and 5 git commands to generate.