Hi all, This patch series adds a new ioctl to query metadata and integrity capability. Patch 1 renames tuple_size field to metadata_size Patch 2 adds a pi_tuple_size field in blk_integrity struct which is later used to export this value to the user as well. Patch 3 allows computing right pi_offset value. Patch 4 introduces a new ioctl to query integrity capability. v4->v5 add a pad field in the user structure to align it (Christoph) get rid of overly long lines (Christoph) add missing nvme prefix to the patch desc (Christoph) v3->v4 rename tuple_size to metadata_size to inflect right meaning (Martin) rectify the condition in blk_validate_integrity_limits when csum type is none (Christoph) change uapi field comment to more friendly formats (Christoph) add comments regarding ioctl behaviour when bi is NULL (Christoph) remove the reserved fields and use different scheme for extensibility (Christian) Other misc code improvements (Christoph) set pi_tuple_size and pi_offset in NVMe only if csum type is not NONE v2->v3 better naming for uapi struct fields (Martin) validate integrity fields in blk-settings.c (Christoph) v1 -> v2 introduce metadata_size, storage_tag_size and ref_tag_size field in the uapi struct (Martin) uapi struct fields comment improvements (Martin) add csum_type definitions to the uapi file (Martin) add fpc_* prefix to uapi struct fields (Andreas) bump the size of rsvd and hence the uapi struct to 32 bytes (Andreas) use correct value for ioctl (Andreas) use clearer names for CRC (Eric) Anuj Gupta (4): block: rename tuple_size field in blk_integrity to metadata_size block: introduce pi_tuple_size field in blk_integrity nvme: set pi_offset only when checksum type is not BLK_INTEGRITY_CSUM_NONE fs: add ioctl to query metadata and protection info capabilities block/bio-integrity-auto.c | 4 +-- block/blk-integrity.c | 54 +++++++++++++++++++++++++++- block/blk-settings.c | 44 +++++++++++++++++++++-- block/ioctl.c | 4 +++ block/t10-pi.c | 16 ++++----- drivers/md/dm-crypt.c | 4 +-- drivers/md/dm-integrity.c | 12 +++---- drivers/nvdimm/btt.c | 2 +- drivers/nvme/host/core.c | 7 ++-- drivers/nvme/target/io-cmd-bdev.c | 2 +- drivers/scsi/sd_dif.c | 3 +- include/linux/blk-integrity.h | 11 ++++-- include/linux/blkdev.h | 3 +- include/uapi/linux/fs.h | 59 +++++++++++++++++++++++++++++++ 14 files changed, 195 insertions(+), 30 deletions(-) -- 2.25.1