"Yan, Zheng" <ukernel@xxxxxxxxx> writes: > On Tue, Oct 9, 2018 at 6:49 PM Luis Henriques <lhenriques@xxxxxxxx> wrote: <snip> >> + file_update_time(dst_file); >> + if (endoff > size) { >> + int caps_flags = 0; >> + >> + /* Let the MDS know about dst file size change */ >> + if (ceph_quota_is_max_bytes_approaching(dst_inode, endoff)) >> + caps_flags |= CHECK_CAPS_NODELAY; >> + if (ceph_inode_set_size(dst_inode, endoff)) >> + caps_flags |= CHECK_CAPS_AUTHONLY; >> + if (caps_flags) >> + ceph_check_caps(dst_ci, caps_flags, NULL); >> + } >> + /* Mark Fw dirty */ >> + spin_lock(&dst_ci->i_ceph_lock); >> + dst_ci->i_inline_version = CEPH_INLINE_NONE; >> + dirty = __ceph_mark_dirty_caps(dst_ci, CEPH_CAP_FILE_WR, &prealloc_cf); >> + spin_unlock(&dst_ci->i_ceph_lock); >> + if (dirty) >> + __mark_inode_dirty(dst_inode, dirty); > > > Above code (from file_update_time) should be placed before code block > of the second do_splice_direct(). We need to mark caps dirty before > droping cap reference. So, in that case I guess I'll also need to replace 'endoff' by 'dst_off' in that code block. Ok, I'll change that, thanks. Cheers, -- Luis > > Otherwise, the code looks great. > > Regards > Yan, Zheng >