Thread (15 messages) 15 messages, 6 authors, 2021-04-20

Re: [dm-devel] [PATCH v2 0/3] Fix dm-crypt zoned block device support

From: Mikulas Patocka <mpatocka@redhat.com>
Date: 2021-04-19 12:52:50
Also in: dm-devel, linux-fsdevel, linux-nvme, linux-scsi


On Sat, 17 Apr 2021, Damien Le Moal wrote:
Mike,

Zone append BIOs (REQ_OP_ZONE_APPEND) always specify the start sector
of the zone to be written instead of the actual location sector to
write. The write location is determined by the device and returned to
the host upon completion of the operation.
I'd like to ask what's the reason for this semantics? Why can't users of 
the zoned device supply real sector numbers?
This interface, while simple and efficient for writing into sequential
zones of a zoned block device, is incompatible with the use of sector
values to calculate a cypher block IV. All data written in a zone is
encrypted using an IV calculated from the first sectors of the zone,
but read operation will specify any sector within the zone, resulting
in an IV mismatch between encryption and decryption. Reads fail in that
case.
I would say that it is incompatible with all dm targets - even the linear 
target is changing the sector number and so it may redirect the write 
outside of the range specified in dm-table and cause corruption.

Instead of complicating device mapper with imperfect support, I would just 
disable REQ_OP_ZONE_APPEND on device mapper at all.

Mikulas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help