]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ceph fscache: Introduce a routine for uncaching single no data page from fscache
authorLi Wang <liwang@ubuntukylin.com>
Thu, 19 Dec 2013 14:03:48 +0000 (06:03 -0800)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 31 Dec 2013 18:32:02 +0000 (20:32 +0200)
Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Milosz Tanski <milosz@adfin.com>
fs/ceph/cache.h

index ba949408a336e663e018e5a2b9d0da040d9346f7..da95f61b7a09e850e6d28de88aceb4493d7157b8 100644 (file)
@@ -67,6 +67,14 @@ static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp)
        return fscache_maybe_release_page(ci->fscache, page, gfp);
 }
 
+static inline void ceph_fscache_readpage_cancel(struct inode *inode,
+                                               struct page *page)
+{
+       struct ceph_inode_info *ci = ceph_inode(inode);
+       if (fscache_cookie_valid(ci->fscache) && PageFsCache(page))
+               __fscache_uncache_page(ci->fscache, page);
+}
+
 static inline void ceph_fscache_readpages_cancel(struct inode *inode,
                                                 struct list_head *pages)
 {
@@ -145,6 +153,11 @@ static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp)
        return 1;
 }
 
+static inline void ceph_fscache_readpage_cancel(struct inode *inode,
+                                               struct page *page)
+{
+}
+
 static inline void ceph_fscache_readpages_cancel(struct inode *inode,
                                                 struct list_head *pages)
 {