From: Filipe Manana <fdmanana@gmail.com>
To: linux-ext4 <linux-ext4@vger.kernel.org>
Subject: RWF_NOWAIT writes not failing when writing to a range with holes
Date: Mon, 15 Jun 2020 18:53:11 +0100 [thread overview]
Message-ID: <CAL3q7H4boq-Rsm+OSK5bSBJhu-ywugOdwWfHRQkyuyDC_RoRZA@mail.gmail.com> (raw)
Hi,
I found out a bug in btrfs where a RWF_NOWRITE does not fail if we
write to a range that starts with an extent followed by holes (since
it requires allocating extent(s)).
When writing a test case for fstests I noticed xfs fails with -EAGAIN
as expected, but ext4 succeeds just like btrfs currently does:
mkfs.ext4 -F /dev/sdb
mount /dev/sdb /mnt
xfs_io -f -d -c "pwrite -S 0xab -b 256K 0 256K" /mnt/bar
xfs_io -c "fpunch 64K 64K" /mnt/bar
sync
xfs_io -d -c "pwrite -N -V 1 -b 128K -S 0xfe 0 128K" /mnt/bar
Is this a known bug? Or is there a technical reason that makes it too
expensive to check no extents will need to be allocated?
Thanks.
--
Filipe David Manana,
“Whether you think you can, or you think you can't — you're right.”
next reply other threads:[~2020-06-15 17:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 17:53 Filipe Manana [this message]
2020-07-08 14:17 ` RWF_NOWAIT writes not failing when writing to a range with holes Jan Kara
2020-10-15 15:37 ` Filipe Manana
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=CAL3q7H4boq-Rsm+OSK5bSBJhu-ywugOdwWfHRQkyuyDC_RoRZA@mail.gmail.com \
--to=fdmanana@gmail.com \
--cc=linux-ext4@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).