Thread (17 messages) 17 messages, 4 authors, 2021-04-19

Re: [PATCH 3/4] btrfs: zoned: fail mount if the device does not support zone append

From: Damien Le Moal <hidden>
Date: 2021-04-19 09:35:41
Also in: dm-devel, linux-btrfs, linux-fsdevel, linux-nvme, linux-scsi

On 2021/04/19 18:29, Christoph Hellwig wrote:
On Fri, Apr 16, 2021 at 06:17:21PM +0200, David Sterba wrote:
quoted
On Fri, Apr 16, 2021 at 12:05:27PM +0900, Damien Le Moal wrote:
quoted
From: Johannes Thumshirn <redacted>

For zoned btrfs, zone append is mandatory to write to a sequential write
only zone, otherwise parallel writes to the same zone could result in
unaligned write errors.

If a zoned block device does not support zone append (e.g. a dm-crypt
zoned device using a non-NULL IV cypher), fail to mount.

Signed-off-by: Johannes Thumshirn <redacted>
Signed-off-by: Damien Le Moal <redacted>
Added to misc-next, thanks. I'll queue it for 5.13, it's not an urgent
fix for 5.12 release but i'll tag it as stable so it'll apear in 5.12.x
later.
Please don't.  Zone append is a strict requirement for zoned devices,
no need to add cargo cult code like this everywhere.
This is only to avoid someone from running zoned-btrfs on top of dm-crypt.
Without this patch, mount will be OK and file data writes will also actually be
OK. But all reads will miserably fail... I would rather have this patch in than
deal with the "bug reports" about btrfs failing to read files. No ?

Note that like you, I dislike having to add such code. But it was my oversight
when I worked on getting dm-crypt to work on zoned drives. Zone append was
overlooked at that time... My bad, really.


-- 
Damien Le Moal
Western Digital Research
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help