Re: [PATCH] ceph: have copy op fall back when src_inode == dst_inode

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

 



Luis Henriques <lhenriques@xxxxxxxx> writes:

> "Jeff Layton" <jlayton@xxxxxxxxxx> writes:
>
>> Currently this just fails, but the fallback implementation can handle
>> this case. Change it to return -EOPNOTSUPP instead of -EINVAL when
>> copying data to a different spot in the same inode.
>
> Thanks, Jeff!
>
> So, just FTR (we had a quick chat on IRC already): I have a slightly
> different patch sitting on my tree for a while.  The difference is that
> my patch still allows to use the 'copy-from' operation in some cases,
> even when src == dst.
>
> I'll run a few more tests on it and send it out soon.

So, after looking at my local patch I realised it was a bit outdated.
After commit 96e6e8f4a68d ("vfs: add missing checks to copy_file_range")
we only need to remove the 'if' statement -- the only other thing I had
locally was to return -EOPNOTSUPP if there were overlaps, which is now
handled in the VFS generic code.

I've tested this (i.e. dropping the 2nd hunk in your patch), and it
seems to be working fine.  Feel free to add my Acked-by to this
(modified) patch.

My next move was going to allow cross-filesystem copies, but I won't be
looking into that while https://github.com/ceph/ceph/pull/25374 isn't
merged (my initial pull-request is from December 2018!!!).

Cheers,
-- 
Luis



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

  Powered by Linux