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>
This commit is contained in:
parent
e835124c2b
commit
a43fb73101
1 changed files with 1 additions and 1 deletions
|
@ -814,7 +814,7 @@ int __ceph_caps_used(struct ceph_inode_info *ci)
|
||||||
used |= CEPH_CAP_PIN;
|
used |= CEPH_CAP_PIN;
|
||||||
if (ci->i_rd_ref)
|
if (ci->i_rd_ref)
|
||||||
used |= CEPH_CAP_FILE_RD;
|
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;
|
used |= CEPH_CAP_FILE_CACHE;
|
||||||
if (ci->i_wr_ref)
|
if (ci->i_wr_ref)
|
||||||
used |= CEPH_CAP_FILE_WR;
|
used |= CEPH_CAP_FILE_WR;
|
||||||
|
|
Loading…
Reference in a new issue