Thread (2 messages) 2 messages, 2 authors, 2025-06-03

Re: [RFC] fs: add ioctl to query protection info capabilities

From: "Martin K. Petersen" <martin.petersen@oracle.com>
Date: 2025-06-03 03:13:13
Also in: linux-fsdevel

Hi Anuj!

I've been mulling over this for a few days...
The block layer currently infers this by looking at the csum_type
(e.g., in blk_integrity_generate). I assumed userspace could do the
same, so I didn't expose a separate pi_tuple_size field. Do you see
this differently?
When the block layer data integrity code was originally designed, the
concept of non-PI metadata didn't exist.

Then NVMe came along and we added support for opaque metadata in
addition to the PI.

As a result, the block layer considers the opaque metadata part of the
PI but it technically isn't. It really should be the other way around:
The PI is a subset of the metadata.

It would require quite a bit of rototilling to metadata-ize the block
layer plumbing at this point. But for a new user API, I do think we
should try to align with the architecture outlined in the standards.

-- 
Martin K. Petersen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help