From: Pankaj <pankaj.raghav@linux.dev>
To: Lukas Herbolt <lukas@herbolt.com>
Cc: linux-xfs@vger.kernel.org, bfoster@redhat.com,
"Darrick J . Wong" <djwong@kernel.org>,
dgc@kernel.org, gost.dev@samsung.com, kundan.kumar@samsung.com,
cem@kernel.org, hch@infradead.org,
Pankaj Raghav <p.raghav@samsung.com>
Subject: Re: [PATCH v2 2/2] xfs: add support for FALLOC_FL_WRITE_ZEROES
Date: Tue, 14 Apr 2026 14:08:05 +0800 [thread overview]
Message-ID: <21D56E00-7F57-4708-A967-5149023D453C@linux.dev> (raw)
In-Reply-To: <c086dc6d3c95d1aed1ac0950ef3278ea@herbolt.com>
>> @@ -1470,7 +1521,7 @@ xfs_falloc_allocate_range(
>> (FALLOC_FL_ALLOCATE_RANGE | FALLOC_FL_KEEP_SIZE | \
>> FALLOC_FL_PUNCH_HOLE | FALLOC_FL_COLLAPSE_RANGE | \
>> FALLOC_FL_ZERO_RANGE | FALLOC_FL_INSERT_RANGE | \
>> - FALLOC_FL_UNSHARE_RANGE)
>> + FALLOC_FL_UNSHARE_RANGE | FALLOC_FL_WRITE_ZEROES)
>>
>> STATIC long
>> __xfs_file_fallocate(
>> @@ -1522,6 +1573,9 @@ __xfs_file_fallocate(
>> case FALLOC_FL_ALLOCATE_RANGE:
>> error = xfs_falloc_allocate_range(file, mode, offset, len);
>> break;
>> + case FALLOC_FL_WRITE_ZEROES:
>> + error = xfs_falloc_write_zeroes(file, mode, offset, len, ac);
>> + break;
>> default:
>> error = -EOPNOTSUPP;
>> break;
>
>I have debug option to skip the check of LBPRZ/DLFEAT on the underlying
>device for testing on regular devices.
>
Ah, this is a good idea. I can fold these changes in the next version.
FWIW, there was a bug in QEMU which disabled this feature for emulated NVMe devices which has been fixed now [1]
[1]https://lore.kernel.org/qemu-devel/aa_w-cz2nKsCdkMi@AALNPWKJENSEN.aal.scsc.local/
--
Pankaj Raghav
next prev parent reply other threads:[~2026-04-14 6:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 13:32 [PATCH v2 0/2] add FALLOC_FL_WRITE_ZEROES support to xfs Pankaj Raghav
2026-04-13 13:32 ` [PATCH v2 1/2] xfs: add xfs_bmap_alloc_or_convert_range function Pankaj Raghav
2026-04-13 13:32 ` [PATCH v2 2/2] xfs: add support for FALLOC_FL_WRITE_ZEROES Pankaj Raghav
2026-04-13 15:05 ` Lukas Herbolt
2026-04-14 6:08 ` Pankaj [this message]
2026-04-13 15:07 ` [PATCH v2 0/2] add FALLOC_FL_WRITE_ZEROES support to xfs Lukas Herbolt
2026-04-14 6:11 ` Pankaj
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=21D56E00-7F57-4708-A967-5149023D453C@linux.dev \
--to=pankaj.raghav@linux.dev \
--cc=bfoster@redhat.com \
--cc=cem@kernel.org \
--cc=dgc@kernel.org \
--cc=djwong@kernel.org \
--cc=gost.dev@samsung.com \
--cc=hch@infradead.org \
--cc=kundan.kumar@samsung.com \
--cc=linux-xfs@vger.kernel.org \
--cc=lukas@herbolt.com \
--cc=p.raghav@samsung.com \
/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