diff options
author | Yan, Zheng <zyan@redhat.com> | 2016-05-18 15:25:03 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-06-01 10:31:07 +0200 |
commit | 46b59b2be05a71d80d76883d2f495f182d768f47 (patch) | |
tree | 0d9ae8027c93619327abd0eb541be02163b53ac7 /fs/ceph/cache.h | |
parent | 1464975816c79a7cd28dc314384f060a122a9d55 (diff) |
ceph: disable fscache when inode is opened for write
All other filesystems do not add dirty pages to fscache. They all
disable fscache when inode is opened for write. Only ceph adds
dirty pages to fscache, but the code is buggy.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/cache.h')
-rw-r--r-- | fs/ceph/cache.h | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/fs/ceph/cache.h b/fs/ceph/cache.h index 5ac591bd012b..dfe9b5823bd3 100644 --- a/fs/ceph/cache.h +++ b/fs/ceph/cache.h @@ -35,9 +35,9 @@ int ceph_fscache_register_fs(struct ceph_fs_client* fsc); void ceph_fscache_unregister_fs(struct ceph_fs_client* fsc); void ceph_fscache_inode_init(struct ceph_inode_info *ci); -void ceph_fscache_register_inode_cookie(struct ceph_fs_client* fsc, - struct ceph_inode_info* ci); +void ceph_fscache_register_inode_cookie(struct inode *inode); void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci); +void ceph_fscache_file_set_cookie(struct inode *inode, struct file *filp); int ceph_readpage_from_fscache(struct inode *inode, struct page *page); int ceph_readpages_from_fscache(struct inode *inode, @@ -48,12 +48,6 @@ void ceph_readpage_to_fscache(struct inode *inode, struct page *page); void ceph_invalidate_fscache_page(struct inode* inode, struct page *page); void ceph_queue_revalidate(struct inode *inode); -static inline void ceph_fscache_update_objectsize(struct inode *inode) -{ - struct ceph_inode_info *ci = ceph_inode(inode); - fscache_attr_changed(ci->fscache); -} - static inline void ceph_fscache_invalidate(struct inode *inode) { fscache_invalidate(ceph_inode(inode)->fscache); @@ -112,8 +106,16 @@ static inline void ceph_fscache_inode_init(struct ceph_inode_info *ci) { } -static inline void ceph_fscache_register_inode_cookie(struct ceph_fs_client* parent_fsc, - struct ceph_inode_info* ci) +static inline void ceph_fscache_register_inode_cookie(struct inode *inode) +{ +} + +static inline void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) +{ +} + +static inline void ceph_fscache_file_set_cookie(struct inode *inode, + struct file *filp) { } @@ -141,10 +143,6 @@ static inline void ceph_readpage_to_fscache(struct inode *inode, { } -static inline void ceph_fscache_update_objectsize(struct inode *inode) -{ -} - static inline void ceph_fscache_invalidate(struct inode *inode) { } @@ -154,10 +152,6 @@ static inline void ceph_invalidate_fscache_page(struct inode *inode, { } -static inline void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) -{ -} - static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp) { return 1; |