Re: [RFC PATCH v5 3/4] ceph: support copy_file_range file operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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
>



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux