Hi Anuj! > A new structure struct fs_pi_cap is introduced, which contains the > following fields: Maybe fs_metadata_cap and then fmd_ as prefix in the struct? > 2. fpc_interval: the data block interval (in bytes) for which the > protection information is generated. The data block interval (in bytes) associated with each unit of metadata. > 3. fpc_csum type: type of checksum used. fmd_guard_tag_type > 4. fpc_metadata_size: size (in bytes) of the metadata associated with each > interval. data block interval, perhaps? > 6. fpc_tag_size: size (in bytes) of tag information. fmd_app_tag_size: size (in bytes) of the application tag. > 7. pi_offset: offset of protection information tuple within the > metadata. Yep. > 8. fpc_ref_tag_size: size in bytes of the reference tag. > 9. fpc_storage_tag_size: size in bytes of the storage tag. Also good. > + case FS_IOC_GETPICAP: > + return blk_get_pi_cap(bdev, argp); FS_IOC_METADATA_CAP? > +/* Checksum types for Protection Information */ > +#define FS_PI_CSUM_NONE 0 > +#define FS_PI_CSUM_IP 1 > +#define FS_PI_CSUM_CRC16_T10DIF 2 > +#define FS_PI_CSUM_CRC64_NVME 3 I'll be adding CRC32 support soon. So maybe make CRC64 a "4" so it won't look weird and unsorted in the uapi. -- Martin K. Petersen