ceph: remove delay check logic from ceph_check_caps()
__ceph_caps_file_wanted() already checks 'caps_wanted_delay_min' and 'caps_wanted_delay_max'. There is no need to duplicate the logic in ceph_check_caps() and __send_cap() Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
@@ -1826,7 +1826,7 @@ retry_snap:
|
||||
if (dirty)
|
||||
__mark_inode_dirty(inode, dirty);
|
||||
if (ceph_quota_is_max_bytes_approaching(inode, iocb->ki_pos))
|
||||
ceph_check_caps(ci, CHECK_CAPS_NODELAY, NULL);
|
||||
ceph_check_caps(ci, 0, NULL);
|
||||
}
|
||||
|
||||
dout("aio_write %p %llx.%llx %llu~%u dropping cap refs on %s\n",
|
||||
@@ -2427,15 +2427,10 @@ static ssize_t __ceph_copy_file_range(struct file *src_file, loff_t src_off,
|
||||
inode_inc_iversion_raw(dst_inode);
|
||||
|
||||
if (dst_off > size) {
|
||||
int caps_flags = 0;
|
||||
|
||||
/* Let the MDS know about dst file size change */
|
||||
if (ceph_quota_is_max_bytes_approaching(dst_inode, dst_off))
|
||||
caps_flags |= CHECK_CAPS_NODELAY;
|
||||
if (ceph_inode_set_size(dst_inode, dst_off))
|
||||
caps_flags |= CHECK_CAPS_AUTHONLY;
|
||||
if (caps_flags)
|
||||
ceph_check_caps(dst_ci, caps_flags, NULL);
|
||||
if (ceph_inode_set_size(dst_inode, dst_off) ||
|
||||
ceph_quota_is_max_bytes_approaching(dst_inode, dst_off))
|
||||
ceph_check_caps(dst_ci, CHECK_CAPS_AUTHONLY, NULL);
|
||||
}
|
||||
/* Mark Fw dirty */
|
||||
spin_lock(&dst_ci->i_ceph_lock);
|
||||
|
Reference in New Issue
Block a user