diff options
author | Milosz Tanski <milosz@adfin.com> | 2013-08-21 17:29:54 -0400 |
---|---|---|
committer | Milosz Tanski <milosz@adfin.com> | 2013-09-06 16:50:11 +0000 |
commit | 99ccbd229cf7453206bc858e795ec1f0345ff258 (patch) | |
tree | 343ab082d154d7c970d90bf44c9887fdb0251cdb /fs/ceph/super.h | |
parent | cd0a2df681ec2af45f50c555c2a39dc92a4dff71 (diff) | |
download | talos-obmc-linux-99ccbd229cf7453206bc858e795ec1f0345ff258.tar.gz talos-obmc-linux-99ccbd229cf7453206bc858e795ec1f0345ff258.zip |
ceph: use fscache as a local presisent cache
Adding support for fscache to the Ceph filesystem. This would bring it to on
par with some of the other network filesystems in Linux (like NFS, AFS, etc...)
In order to mount the filesystem with fscache the 'fsc' mount option must be
passed.
Signed-off-by: Milosz Tanski <milosz@adfin.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index f1e4e4766ea2..bb23ef636177 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -16,6 +16,10 @@ #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 */ }; |