• Yan, Zheng's avatar
    ceph: fix request max size · 3871cbb9
    Yan, Zheng authored
    ceph_check_caps() requests new max size only when there is Fw cap.
    If we call check_max_size() while there is no Fw cap. It updates
    i_wanted_max_size and calls ceph_check_caps(), but ceph_check_caps()
    does nothing. Later when Fw cap is issued, we call check_max_size()
    again. But i_wanted_max_size is equal to 'endoff' at this time, so
    check_max_size() doesn't call ceph_check_caps() and we end up with
    waiting for the new max size forever.
    
    The fix is duplicate ceph_check_caps()'s "request max size" code in
    check_max_size(), and make try_get_cap_refs() wait for the Fw cap
    before retry requesting new max size.
    
    This patch also removes the "endoff > (inode->i_size << 1)" check
    in check_max_size(). It's useless because there is no corresponding
    logic in ceph_check_caps().
    Reviewed-by: default avatarSage Weil <sage@inktank.com>
    Signed-off-by: default avatarYan, Zheng <zheng.z.yan@intel.com>
    3871cbb9
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
addr.c Loading commit data...
caps.c Loading commit data...
ceph_frag.c Loading commit data...
debugfs.c Loading commit data...
dir.c Loading commit data...
export.c Loading commit data...
file.c Loading commit data...
inode.c Loading commit data...
ioctl.c Loading commit data...
ioctl.h Loading commit data...
locks.c Loading commit data...
mds_client.c Loading commit data...
mds_client.h Loading commit data...
mdsmap.c Loading commit data...
snap.c Loading commit data...
strings.c Loading commit data...
super.c Loading commit data...
super.h Loading commit data...
xattr.c Loading commit data...