ceph: update i_max_size even if inode version does not change
PATCH 1/1 ceph: update i_max_size even if inode version does not change
handle following sequence of events:
- client releases a inode with i_max_size > 0. The release message is queued. (is not sent to the auth MDS)
- a 'lookup' request reply from non-auth MDS returns the same inode.
- client opens the inode in write mode. The version of inode trace in 'open' request reply is equal to the cached inode's version.
- client requests new max size. The MDS ignores the request because it does not affect client's write range
--- fs/ceph/inode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
fs/ceph/inode.c +8 -8
@@ -659,14 +659,6 @@ static int fill_inode(struct inode *inode,le32_to_cpu (info->time_warp_seq), &ctime, &mtime, &atime); -/* only update max_size on auth cap */ -if ((info->cap.flags &CEPH_CAP_FLAG_AUTH ) && - ci->i_max_size !=le64_to_cpu (info->max_size)) { -dout ("max_size %lld -> %llu\n" , ci->i_max_size, -le64_to_cpu (info->max_size)); - ci->i_max_size =le64_to_cpu (info->max_size); - } - ci->i_layout = info->layout; inode->i_blkbits =fls (le32_to_cpu (info->layout.fl_stripe_unit)) -1 ;
@@ -755,6 +747,14 @@ static int fill_inode(struct inode *inode, ci->i_max_offset =2 ; } no_change: +/* only update max_size on auth cap */ +if ((info->cap.flags &CEPH_CAP_FLAG_AUTH ) && + ci->i_max_size !=le64_to_cpu (info->max_size)) { +dout ("max_size %lld -> %llu\n" , ci->i_max_size, +le64_to_cpu (info->max_size)); + ci->i_max_size =le64_to_cpu (info->max_size); + } +spin_unlock (&ci->i_ceph_lock);/* queue truncate if we saw i_size decrease */
Signature · 1 line
1.8.5.3
Quoted 10 lines · Zheng
handle following sequence of events:
- client releases a inode withi_max_size> 0. The release message is queued. (is not sent to the auth MDS)
- a 'lookup' request reply from non-auth MDS returns the same inode.
- client opens the inode in write mode. The version of inode trace in 'open' request reply is equal to the cached inode's version.
- client requests new max size. The MDS ignores the request because it does not affect client's write rangeSigned-off-by Yan, Zheng <[email protected]>
Quoted 47 lines
--- fs/ceph/inode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)fs/ceph/inode.c +8
-8@@ -659,14 +659,6 @@ static int fill_inode(struct inode *inode,le32_to_cpu (info->time_warp_seq), &ctime, &mtime, &atime); -/* only update max_size on auth cap */ -if ((info->cap.flags &CEPH_CAP_FLAG_AUTH ) && - ci->i_max_size !=le64_to_cpu (info->max_size)) { -dout ("max_size %lld -> %llu\n" , ci->i_max_size, -le64_to_cpu (info->max_size)); - ci->i_max_size =le64_to_cpu (info->max_size); - } - ci->i_layout = info->layout; inode->i_blkbits =fls (le32_to_cpu (info->layout.fl_stripe_unit)) -1 ;@@ -755,6 +747,14 @@ static int fill_inode(struct inode *inode, ci->i_max_offset =2 ; } no_change: +/* only update max_size on auth cap */ +if ((info->cap.flags &CEPH_CAP_FLAG_AUTH ) && + ci->i_max_size !=le64_to_cpu (info->max_size)) { +dout ("max_size %lld -> %llu\n" , ci->i_max_size, +le64_to_cpu (info->max_size)); + ci->i_max_size =le64_to_cpu (info->max_size); + } +spin_unlock (&ci->i_ceph_lock);/* queue truncate if we saw i_size decrease */ Signature · 6 lines
1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html