diff options
author | Sage Weil <sage@newdream.net> | 2010-09-17 09:54:08 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-09-17 09:54:31 -0700 |
commit | a43fb73101eaf6db0b33d22c152b338ab8b3edbb (patch) | |
tree | 039276b81586a986f5b9662fc28b37cbf9271eb3 /fs/ceph | |
parent | e835124c2be289515b918f2688ced4249e2de566 (diff) | |
download | kernel_samsung_smdk4412-a43fb73101eaf6db0b33d22c152b338ab8b3edbb.zip kernel_samsung_smdk4412-a43fb73101eaf6db0b33d22c152b338ab8b3edbb.tar.gz kernel_samsung_smdk4412-a43fb73101eaf6db0b33d22c152b338ab8b3edbb.tar.bz2 |
ceph: check mapping to determine if FILE_CACHE cap is used
See if the i_data mapping has any pages to determine if the FILE_CACHE
capability is currently in use, instead of assuming it is any time the
rdcache_gen value is set (i.e., issued -> used).
This allows the MDS RECALL_STATE process work for inodes that have cached
pages.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/caps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index b01c316..73c1530 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -814,7 +814,7 @@ int __ceph_caps_used(struct ceph_inode_info *ci) used |= CEPH_CAP_PIN; if (ci->i_rd_ref) used |= CEPH_CAP_FILE_RD; - if (ci->i_rdcache_ref || ci->i_rdcache_gen) + if (ci->i_rdcache_ref || ci->vfs_inode.i_data.nrpages) used |= CEPH_CAP_FILE_CACHE; if (ci->i_wr_ref) used |= CEPH_CAP_FILE_WR; |