From: Keith Busch <kbusch@xxxxxxxxxx> Just some fixes and cleanups to counting integrity segments when metadata is used. This fixes merging issues. Changes from v2: Included all the follow up patches I mentioned in the v2 thread. Incorporated Christoph's suggestion to rename blk_rq_count_integrity_sg. Keith Busch (10): blk-mq: set the nr_integrity_segments from bio block: provide helper for nr_integrity_segments scsi: use request helper to get integrity segments nvme-rdma: use request helper to get integrity segments block: unexport blk_rq_count_integrity_sg blk-integrity: simplify counting segments blk-integrity: simplify mapping sg blk-integrity: remove inappropriate limit checks blk-integrity: consider entire bio list for merging blk-merge: properly account for integrity segments block/bio-integrity.c | 7 ---- block/blk-integrity.c | 78 +++++++---------------------------- block/blk-merge.c | 13 +++--- block/blk-mq.c | 4 ++ block/blk.h | 34 --------------- drivers/nvme/host/rdma.c | 6 +-- drivers/scsi/scsi_lib.c | 6 +-- include/linux/blk-integrity.h | 11 ++--- include/linux/blk-mq.h | 12 ++++++ 9 files changed, 47 insertions(+), 124 deletions(-) -- 2.43.5