Re: [RFC PATCH 2/2] ceph: support copy_file_range file operation

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

 



Gregory Farnum <gfarnum@xxxxxxxxxx> writes:

> On Tue, Aug 21, 2018 at 2:40 AM, Yan, Zheng <ukernel@xxxxxxxxx> wrote:
>> On Tue, Aug 21, 2018 at 5:21 PM Luis Henriques <lhenriques@xxxxxxxx> wrote:
>>>
>>> "Yan, Zheng" <ukernel@xxxxxxxxx> writes:
>>> ...
>>> >> +       ret = ceph_get_caps(dst_ci, CEPH_CAP_FILE_WR,
>>> >> +                           CEPH_CAP_FILE_BUFFER,
>>> >> +                           endoff, &got, NULL);
>>> >> +       if (ret < 0)
>>> >> +               goto out;
>>> >> +
>>> >
>>> > Getting FILE_RD caps for src inode? I think adding another
>>> > ceph_get_caps() call here may cause deadlock (shouldn't hold any cap
>>> > while waiting).
>>>
>>> I thought about that initially, but since I'm using do_splice_direct for
>>> doing any manual copies I assumed that this would eventually be handled
>>> somewhere else.  Because we don't really FILE_RD if we're doing only
>>> full (remote) object copies, do we?
>>>
>>
>> We still need to get FILE_RD for full object copies. Because other
>> client may have dirty data in page cache. we need to until the dirty
>> data get flushed
>
> Plus it's not like the OSD has any idea about the filesystem's caps;
> the client needs to hold them all on the OSD's behalf while it's doing
> remote data copies.

Yep, caps knowledge is on the MDS side.  Makes sense, and I'm currently
looking at adding the FILE_RD capability to the source file (still
trying to find out about Zheng's deadlock warning).

Cheers,
-- 
Luis



[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