From: Matthias Goergens <matthias.goergens@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
linux-kernel@vger.kernel.org, ansgar.loesser@kom.tu-darmstadt.de,
djwong@kernel.org, david@fromorbit.com, amir73il@gmail.com
Subject: [PATCH v2 0/1] vfs: add FILE_DEDUPE_RANGE_REPORT_PROGRESS flag to FIDEDUPERANGE
Date: Fri, 14 Aug 2026 16:23:25 +0800 [thread overview]
Message-ID: <20260814082326.3756669-1-matthias.goergens@gmail.com> (raw)
In-Reply-To: <20260805071414.3414870-1-matthias.goergens@gmail.com>
Changes since v1 (<20260805071414.3414870-1-matthias.goergens@gmail.com>):
Darrick is right that bytes_deduped = len predates the VFS hoisting -
the manpage describes the behaviour the patch would introduce, not the
historical default, and deployed consumers (duperemove advances file
offsets by bytes_deduped) depend on the old semantics. v2 therefore
keeps the default unchanged and gates the truthful behaviour behind a
new flag:
- FILE_DEDUPE_RANGE_REPORT_PROGRESS (the former reserved2 field is now
flags): bytes_deduped reports the bytes actually deduplicated, and a
non-zero request shortened to zero fails per destination with -EINVAL
instead of reporting success with no progress.
- Unknown flag bits are rejected with -EINVAL.
The fstests series will follow in the same shape: the generic/517
golden output stays as it is (unflagged behaviour is unchanged), and
the new test exercises the flag, including one unflagged case pinning
the legacy reporting.
Darrick also notes the manpage is wrong - with the flag in place, the
right fix is to document the flag in ioctl_fideduperange(2) rather than
change the default; a man-pages patch can follow once the flag name and
semantics are settled.
Amir: you reviewed the v1 logic favourably - could you have a look at
the flag shape instead? In particular: the name
(FILE_DEDUPE_RANGE_REPORT_PROGRESS), the semantics (actual bytes plus
-EINVAL on zero progress), and whether the manpage fix should ride
along with the kernel patch or follow separately. If this shape works
for you, the Reviewed-by on the flagged behaviour would be very
welcome.
next prev parent reply other threads:[~2026-08-14 8:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 7:14 [PATCH 0/2] vfs: report truthful FIDEDUPERANGE progress safely Matthias Goergens
2026-08-05 7:14 ` [PATCH 1/2] vfs: fail dedupe requests that cannot make progress Matthias Goergens
2026-08-05 7:14 ` [PATCH 2/2] vfs: report the amount of bytes actually deduplicated Matthias Goergens
2026-08-12 7:46 ` [PATCH 0/2] vfs: report truthful FIDEDUPERANGE progress safely Christian Brauner
2026-08-13 15:33 ` Amir Goldstein
2026-08-13 20:09 ` Darrick J. Wong
2026-08-14 8:23 ` Matthias Goergens [this message]
2026-08-14 8:23 ` [PATCH v2] vfs: add FILE_DEDUPE_RANGE_REPORT_PROGRESS flag to FIDEDUPERANGE Matthias Goergens
2026-08-14 16:16 ` Darrick J. Wong
2026-08-17 11:56 ` [PATCH v3 0/1] " Matthias Goergens
2026-08-17 11:56 ` [PATCH v3] " Matthias Goergens
2026-08-18 8:50 ` Christoph Hellwig
2026-09-18 10:37 ` [PATCH v4 0/2] " Matthias Goergens
2026-09-18 10:37 ` [PATCH v4 1/2] dax: return the comparison error from dax_dedupe_file_range_compare() Matthias Goergens
2026-09-18 10:37 ` [PATCH v4 2/2] vfs: add FILE_DEDUPE_RANGE_REPORT_PROGRESS flag to FIDEDUPERANGE Matthias Goergens
2026-09-18 11:21 ` Amir Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260814082326.3756669-1-matthias.goergens@gmail.com \
--to=matthias.goergens@gmail.com \
--cc=amir73il@gmail.com \
--cc=ansgar.loesser@kom.tu-darmstadt.de \
--cc=brauner@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox