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