Linux XFS filesystem development
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] generic/517: expect truthful dedupe progress
       [not found] ` <20260805071839.3423779-2-matthias.goergens@gmail.com>
@ 2026-08-11  8:36   ` Zorro Lang
  0 siblings, 0 replies; only message in thread
From: Zorro Lang @ 2026-08-11  8:36 UTC (permalink / raw)
  To: Matthias Goergens; +Cc: fstests, xfs-list, btrfs-list, Filipe Manana

On Wed, Aug 05, 2026 at 03:18:38PM +0800, Matthias Goergens wrote:
> The VFS currently reports the requested FIDEDUPERANGE length even when it
> shortens the operation to avoid sharing a partial EOF block into the middle
> of the destination.  Once the kernel reports its actual progress, the first
> dedupe in this test reports 131072 of 131172 bytes.  xfs_io then retries the
> 100-byte remainder, which cannot make progress and returns -EINVAL.  The
> separate 100-byte request returns the same error.
> 
> Update the golden output for those truthful results.  This is the output
> change that caused commit 4a57a8400075 ("vf/remap: return the amount of
> bytes actually deduplicated") to be reverted.  The paired kernel series that
> determines the new output is linked from the cover letter.
> 
> The updated test passes on btrfs and XFS with the paired kernel changes.

To avoid panic in downstream testing caused by sudden breaking changes in
expected behavior, we'd better to reference the commit or patch that
introduced the change.

Rather than using _fixed_by_kernel_commit helper, _wants_kernel_commit
might be more appropriate here.

CC'ing Filipe, the original author of this test case, for further review.

Thanks,
Zorro

> 
> Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com>
> ---
>  tests/generic/517     | 6 ++++++
>  tests/generic/517.out | 6 +++---
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/generic/517 b/tests/generic/517
> index 3f7027a8..ab5d17e7 100755
> --- a/tests/generic/517
> +++ b/tests/generic/517
> @@ -11,6 +11,12 @@
>  . ./common/preamble
>  _begin_fstest auto quick dedupe clone
>  
> +# The dedupe amounts this test records are only correct once the kernel
> +# reports the number of bytes it actually deduplicated rather than the number
> +# requested. Both dedupe calls below target a range that does not reach the
> +# destination's EOF, so generic_remap_check_len() shortens them under
> +# REMAP_FILE_CAN_SHORTEN.
> +
>  # Import common functions.
>  . ./common/filter
>  . ./common/reflink
> diff --git a/tests/generic/517.out b/tests/generic/517.out
> index b9b63207..6ba753d8 100644
> --- a/tests/generic/517.out
> +++ b/tests/generic/517.out
> @@ -13,7 +13,8 @@ File content before first deduplication:
>  *
>  0786528 ae ae ae ae
>  0786532
> -deduped 131172/131172 bytes at offset 65536
> +XFS_IOC_FILE_EXTENT_SAME: Invalid argument
> +deduped 131072/131172 bytes at offset 65536
>  XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
>  File content after first deduplication and before unmounting:
>  0000000 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
> @@ -33,8 +34,7 @@ File content after first unmount:
>  0786532
>  wrote 100/100 bytes at offset 0
>  XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> -deduped 100/100 bytes at offset 655360
> -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> +XFS_IOC_FILE_EXTENT_SAME: Invalid argument
>  File content after second deduplication:
>  0000000 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
>  *
> -- 
> 2.55.0
> 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-11  8:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260805071839.3423779-1-matthias.goergens@gmail.com>
     [not found] ` <20260805071839.3423779-2-matthias.goergens@gmail.com>
2026-08-11  8:36   ` [PATCH 1/2] generic/517: expect truthful dedupe progress Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox