Browse Source

ceph: fscache: add an interface to synchronize object store limit

Add an interface to explicitly synchronize object->store_limit[_l]
with inode->i_size

Tested-by: Milosz Tanski <milosz@adfin.com>
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
Signed-off-by: Min Chen <minchen@ubuntukylin.com>
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Yunchuan Wen 11 years ago
parent
commit
020c4bddc0
1 changed files with 10 additions and 0 deletions
  1. 10 0
      fs/ceph/cache.h

+ 10 - 0
fs/ceph/cache.h

@@ -48,6 +48,12 @@ void ceph_readpage_to_fscache(struct inode *inode, struct page *page);
 void ceph_invalidate_fscache_page(struct inode* inode, struct page *page);
 void ceph_invalidate_fscache_page(struct inode* inode, struct page *page);
 void ceph_queue_revalidate(struct inode *inode);
 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)
 static inline void ceph_fscache_invalidate(struct inode *inode)
 {
 {
 	fscache_invalidate(ceph_inode(inode)->fscache);
 	fscache_invalidate(ceph_inode(inode)->fscache);
@@ -135,6 +141,10 @@ 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)
 static inline void ceph_fscache_invalidate(struct inode *inode)
 {
 {
 }
 }