* [PATCH v2] cifs: fix that return -EINVAL when do dedupe operation
@ 2019-03-16 4:11 XiaoLi Feng
2019-03-16 5:34 ` Steve French
0 siblings, 1 reply; 4+ messages in thread
From: XiaoLi Feng @ 2019-03-16 4:11 UTC (permalink / raw)
To: smfrench, linux-cifs; +Cc: Xiaoli Feng
From: Xiaoli Feng <fengxiaoli0714@gmail.com>
dedupe_file_range operations is combiled into remap_file_range.
But it's always skipped for dedupe operations in function
cifs_remap_file_range.
Example to test:
Before this patch:
# dd if=/dev/zero of=cifs/file bs=1M count=1
# xfs_io -c "dedupe cifs/file 4k 64k 4k" cifs/file
XFS_IOC_FILE_EXTENT_SAME: Invalid argument
After this patch:
# dd if=/dev/zero of=cifs/file bs=1M count=1
# xfs_io -c "dedupe cifs/file 4k 64k 4k" cifs/file
XFS_IOC_FILE_EXTENT_SAME: Operation not supported
Influence for xfstests:
generic/091
generic/112
generic/127
generic/263
These tests report this error "do_copy_range:: Invalid
argument" instead of "FIDEDUPERANGE: Invalid argument".
Because there are still two bugs cause these test failed.
https://bugzilla.kernel.org/show_bug.cgi?id=202935
https://bugzilla.kernel.org/show_bug.cgi?id=202785
Signed-off-by: Xiaoli Feng <fengxiaoli0714@gmail.com>
---
Sorry, there are some missing in commit log of last patch. Because they
are beginning with the world '#". The git will ignores these lines.
And add influence for xfstests.
fs/cifs/cifsfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 217276b8b942..f9b71c12cc9f 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -1008,7 +1008,7 @@ static loff_t cifs_remap_file_range(struct file *src_file, loff_t off,
unsigned int xid;
int rc;
- if (remap_flags & ~REMAP_FILE_ADVISORY)
+ if (remap_flags & ~(REMAP_FILE_DEDUP | REMAP_FILE_ADVISORY))
return -EINVAL;
cifs_dbg(FYI, "clone range\n");
--
2.18.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] cifs: fix that return -EINVAL when do dedupe operation
2019-03-16 4:11 [PATCH v2] cifs: fix that return -EINVAL when do dedupe operation XiaoLi Feng
@ 2019-03-16 5:34 ` Steve French
2019-03-16 16:46 ` Pavel Shilovsky
0 siblings, 1 reply; 4+ messages in thread
From: Steve French @ 2019-03-16 5:34 UTC (permalink / raw)
To: XiaoLi Feng; +Cc: CIFS, Xiaoli Feng
updated and tentatively placed in for-next - running the automated tests now
On Fri, Mar 15, 2019 at 11:12 PM XiaoLi Feng <xifeng@redhat.com> wrote:
>
> From: Xiaoli Feng <fengxiaoli0714@gmail.com>
>
> dedupe_file_range operations is combiled into remap_file_range.
> But it's always skipped for dedupe operations in function
> cifs_remap_file_range.
>
> Example to test:
> Before this patch:
> # dd if=/dev/zero of=cifs/file bs=1M count=1
> # xfs_io -c "dedupe cifs/file 4k 64k 4k" cifs/file
> XFS_IOC_FILE_EXTENT_SAME: Invalid argument
>
> After this patch:
> # dd if=/dev/zero of=cifs/file bs=1M count=1
> # xfs_io -c "dedupe cifs/file 4k 64k 4k" cifs/file
> XFS_IOC_FILE_EXTENT_SAME: Operation not supported
>
> Influence for xfstests:
> generic/091
> generic/112
> generic/127
> generic/263
> These tests report this error "do_copy_range:: Invalid
> argument" instead of "FIDEDUPERANGE: Invalid argument".
> Because there are still two bugs cause these test failed.
> https://bugzilla.kernel.org/show_bug.cgi?id=202935
> https://bugzilla.kernel.org/show_bug.cgi?id=202785
>
> Signed-off-by: Xiaoli Feng <fengxiaoli0714@gmail.com>
> ---
>
> Sorry, there are some missing in commit log of last patch. Because they
> are beginning with the world '#". The git will ignores these lines.
> And add influence for xfstests.
>
> fs/cifs/cifsfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
> index 217276b8b942..f9b71c12cc9f 100644
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@ -1008,7 +1008,7 @@ static loff_t cifs_remap_file_range(struct file *src_file, loff_t off,
> unsigned int xid;
> int rc;
>
> - if (remap_flags & ~REMAP_FILE_ADVISORY)
> + if (remap_flags & ~(REMAP_FILE_DEDUP | REMAP_FILE_ADVISORY))
> return -EINVAL;
>
> cifs_dbg(FYI, "clone range\n");
> --
> 2.18.1
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] cifs: fix that return -EINVAL when do dedupe operation
2019-03-16 5:34 ` Steve French
@ 2019-03-16 16:46 ` Pavel Shilovsky
[not found] ` <CAOoqPcQN-bqfiMkGWffXZ-EZqiZZ=NEySUF8PmPzcaK2s=yHPA@mail.gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Shilovsky @ 2019-03-16 16:46 UTC (permalink / raw)
To: XiaoLi Feng, Xiaoli Feng; +Cc: CIFS, Steve French
пт, 15 мар. 2019 г. в 22:39, Steve French <smfrench@gmail.com>:
>
> updated and tentatively placed in for-next - running the automated tests now
>
> On Fri, Mar 15, 2019 at 11:12 PM XiaoLi Feng <xifeng@redhat.com> wrote:
> >
> > From: Xiaoli Feng <fengxiaoli0714@gmail.com>
> >
> > dedupe_file_range operations is combiled into remap_file_range.
> > But it's always skipped for dedupe operations in function
> > cifs_remap_file_range.
> >
> > Example to test:
> > Before this patch:
> > # dd if=/dev/zero of=cifs/file bs=1M count=1
> > # xfs_io -c "dedupe cifs/file 4k 64k 4k" cifs/file
> > XFS_IOC_FILE_EXTENT_SAME: Invalid argument
> >
> > After this patch:
> > # dd if=/dev/zero of=cifs/file bs=1M count=1
> > # xfs_io -c "dedupe cifs/file 4k 64k 4k" cifs/file
> > XFS_IOC_FILE_EXTENT_SAME: Operation not supported
> >
> > Influence for xfstests:
> > generic/091
> > generic/112
> > generic/127
> > generic/263
> > These tests report this error "do_copy_range:: Invalid
> > argument" instead of "FIDEDUPERANGE: Invalid argument".
> > Because there are still two bugs cause these test failed.
> > https://bugzilla.kernel.org/show_bug.cgi?id=202935
> > https://bugzilla.kernel.org/show_bug.cgi?id=202785
Hi Xiaoli,
About https://bugzilla.kernel.org/show_bug.cgi?id=202785: which kernel
version did you use for testing?
There is a fix merged recently that fixes a similar problem:
https://patchwork.ozlabs.org/patch/1052067/.
--
Best regards,
Pavel Shilovsky
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] cifs: fix that return -EINVAL when do dedupe operation
[not found] ` <CAOoqPcQN-bqfiMkGWffXZ-EZqiZZ=NEySUF8PmPzcaK2s=yHPA@mail.gmail.com>
@ 2019-03-17 20:52 ` Pavel Shilovsky
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Shilovsky @ 2019-03-17 20:52 UTC (permalink / raw)
To: 冯小丽; +Cc: XiaoLi Feng, CIFS, Steve French
Thanks for confirming this!
--
Best regards,
Pavel Shilovsky
вс, 17 мар. 2019 г. в 06:46, 冯小丽 <fengxiaoli0714@gmail.com>:
>
> I checked my test kernel. It didn't include the fixed patch you mention. And after including this fixed
> patch, bz202785 is gone. Thank you for this information. I will update the commit log.
>
> (re-send this mail again. Because the last mail message contains HTML subpart. Sorry about that)
>
> Pavel Shilovsky <piastryyy@gmail.com> 于2019年3月17日周日 上午12:46写道:
>>
>> пт, 15 мар. 2019 г. в 22:39, Steve French <smfrench@gmail.com>:
>>
>> >
>> > updated and tentatively placed in for-next - running the automated tests now
>> >
>> > On Fri, Mar 15, 2019 at 11:12 PM XiaoLi Feng <xifeng@redhat.com> wrote:
>> > >
>> > > From: Xiaoli Feng <fengxiaoli0714@gmail.com>
>> > >
>> > > dedupe_file_range operations is combiled into remap_file_range.
>> > > But it's always skipped for dedupe operations in function
>> > > cifs_remap_file_range.
>> > >
>> > > Example to test:
>> > > Before this patch:
>> > > # dd if=/dev/zero of=cifs/file bs=1M count=1
>> > > # xfs_io -c "dedupe cifs/file 4k 64k 4k" cifs/file
>> > > XFS_IOC_FILE_EXTENT_SAME: Invalid argument
>> > >
>> > > After this patch:
>> > > # dd if=/dev/zero of=cifs/file bs=1M count=1
>> > > # xfs_io -c "dedupe cifs/file 4k 64k 4k" cifs/file
>> > > XFS_IOC_FILE_EXTENT_SAME: Operation not supported
>> > >
>> > > Influence for xfstests:
>> > > generic/091
>> > > generic/112
>> > > generic/127
>> > > generic/263
>> > > These tests report this error "do_copy_range:: Invalid
>> > > argument" instead of "FIDEDUPERANGE: Invalid argument".
>> > > Because there are still two bugs cause these test failed.
>> > > https://bugzilla.kernel.org/show_bug.cgi?id=202935
>> > > https://bugzilla.kernel.org/show_bug.cgi?id=202785
>>
>> Hi Xiaoli,
>>
>> About https://bugzilla.kernel.org/show_bug.cgi?id=202785: which kernel
>> version did you use for testing?
>>
>> There is a fix merged recently that fixes a similar problem:
>> https://patchwork.ozlabs.org/patch/1052067/.
>>
>> --
>> Best regards,
>> Pavel Shilovsky
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-17 20:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-16 4:11 [PATCH v2] cifs: fix that return -EINVAL when do dedupe operation XiaoLi Feng
2019-03-16 5:34 ` Steve French
2019-03-16 16:46 ` Pavel Shilovsky
[not found] ` <CAOoqPcQN-bqfiMkGWffXZ-EZqiZZ=NEySUF8PmPzcaK2s=yHPA@mail.gmail.com>
2019-03-17 20:52 ` Pavel Shilovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).