linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* move integrity settings to queue_limits
@ 2024-06-05  6:28 Christoph Hellwig
  2024-06-05  6:28 ` [PATCH 01/12] dm-integrity: use the nop integrity profile Christoph Hellwig
                   ` (11 more replies)
  0 siblings, 12 replies; 37+ messages in thread
From: Christoph Hellwig @ 2024-06-05  6:28 UTC (permalink / raw)
  To: Jens Axboe, Martin K. Petersen
  Cc: Mike Snitzer, Mikulas Patocka, Song Liu, Yu Kuai, Dan Williams,
	Vishal Verma, Dave Jiang, Ira Weiny, Keith Busch, Sagi Grimberg,
	Chaitanya Kulkarni, linux-block, dm-devel, linux-raid, nvdimm,
	linux-nvme, linux-scsi

Hi Jens, hi Martin,

this series converts the blk-integrity settings to sit in the queue
limits and be updated through the atomic queue limits API.

I've mostly tested this with nvme, scsi is only covered by simple
scsi_debug based tests.

For MD I found an pre-existing error handling bug when combining PI
capable devices with not PI capable devices.  The fix was posted here
(and is included in the git branch below):

   https://lore.kernel.org/linux-raid/20240604172607.3185916-1-hch@lst.de/

For dm-integrity my testing showed that even the baseline fails to create
the luks-based dm-crypto with dm-integrity backing for the authentication
data.  As the failure is non-fatal I've not addressed it here.

Note that the support for native metadata in dm-crypt by Mikulas will
need a rebase on top of this, but as it already requires another
block layer patch and the changes in this series will simplify it a bit
I hope that is ok.

The series is based on top of my previously sent "convert the SCSI ULDs
to the atomic queue limits API v2" API.

A git tree is available here:

   git://git.infradead.org/users/hch/block.git block-integrity-limits

Gitweb:

   http://git.infradead.org/?p=users/hch/block.git;a=shortlog;h=refs/heads/block-integrity-limits

Diffstat:
 Documentation/block/data-integrity.rst |   49 ------
 block/Kconfig                          |    8 -
 block/Makefile                         |    3 
 block/bio-integrity.c                  |   36 ++---
 block/blk-integrity.c                  |  232 +++++++++-----------------------
 block/blk-mq.c                         |   13 -
 block/blk-settings.c                   |  118 +++++++++++++++-
 block/blk.h                            |    8 +
 block/t10-pi.c                         |  236 ++++++++++-----------------------
 drivers/md/dm-core.h                   |    1 
 drivers/md/dm-crypt.c                  |    4 
 drivers/md/dm-integrity.c              |   47 +-----
 drivers/md/dm-table.c                  |  161 +++-------------------
 drivers/md/md.c                        |   72 ++--------
 drivers/md/md.h                        |    5 
 drivers/md/raid0.c                     |    7 
 drivers/md/raid1.c                     |   10 -
 drivers/md/raid10.c                    |   10 -
 drivers/md/raid5.c                     |    2 
 drivers/nvdimm/btt.c                   |   13 -
 drivers/nvme/host/Kconfig              |    1 
 drivers/nvme/host/core.c               |   71 +++++----
 drivers/nvme/host/multipath.c          |    3 
 drivers/nvme/target/Kconfig            |    1 
 drivers/nvme/target/io-cmd-bdev.c      |   16 +-
 drivers/scsi/Kconfig                   |    1 
 drivers/scsi/sd.c                      |   28 +--
 drivers/scsi/sd.h                      |   12 -
 drivers/scsi/sd_dif.c                  |   48 ++----
 drivers/target/target_core_iblock.c    |   49 +++---
 include/linux/bio.h                    |    7 
 include/linux/blk-integrity.h          |   74 ++++------
 include/linux/blkdev.h                 |   19 +-
 include/linux/t10-pi.h                 |   20 --
 34 files changed, 524 insertions(+), 861 deletions(-)

^ permalink raw reply	[flat|nested] 37+ messages in thread
* move integrity settings to queue_limits v3
@ 2024-06-13  8:48 Christoph Hellwig
  2024-06-13  8:48 ` [PATCH 12/12] block: move integrity information into queue_limits Christoph Hellwig
  0 siblings, 1 reply; 37+ messages in thread
From: Christoph Hellwig @ 2024-06-13  8:48 UTC (permalink / raw)
  To: Jens Axboe, Martin K. Petersen
  Cc: Mike Snitzer, Mikulas Patocka, Song Liu, Yu Kuai, Dan Williams,
	Vishal Verma, Dave Jiang, Ira Weiny, Keith Busch, Sagi Grimberg,
	Chaitanya Kulkarni, linux-block, dm-devel, linux-raid, nvdimm,
	linux-nvme, linux-scsi

Hi Jens, hi Martin,

this series converts the blk-integrity settings to sit in the queue
limits and be updated through the atomic queue limits API.

I've mostly tested this with nvme, scsi is only covered by simple
scsi_debug based tests.

For MD I found an pre-existing error handling bug when combining PI
capable devices with not PI capable devices.  The fix was posted here
(and is included in the git branch below):

   https://lore.kernel.org/linux-raid/20240604172607.3185916-1-hch@lst.de/

For dm-integrity my testing showed that even the baseline fails to create
the luks-based dm-crypto with dm-integrity backing for the authentication
data.  As the failure is non-fatal I've not addressed it here.

Note that the support for native metadata in dm-crypt by Mikulas will
need a rebase on top of this, but as it already requires another
block layer patch and the changes in this series will simplify it a bit
I hope that is ok.

The series is based on top of my previously sent "convert the SCSI ULDs
to the atomic queue limits API v2" API.

A git tree is available here:

   git://git.infradead.org/users/hch/block.git block-integrity-limits

Gitweb:

   http://git.infradead.org/?p=users/hch/block.git;a=shortlog;h=refs/heads/block-integrity-limits

Changes since v2:
 - keep the unused BIP_CTRL_NOCHECK, BIP_DISK_NOCHECK and
   BIP_IP_CHECKSUM flags for now

Changes since v1:
 - keep generating (empty) non-PI metadata
 - use a packed enum for the csum type
 - remove an unused flag left in the code

Diffstat:
 Documentation/block/data-integrity.rst |   49 ------
 block/Kconfig                          |    8 -
 block/Makefile                         |    3 
 block/bio-integrity.c                  |   43 +++--
 block/blk-integrity.c                  |  229 ++++++++----------------------
 block/blk-mq.c                         |   13 -
 block/blk-settings.c                   |  118 ++++++++++++++-
 block/blk.h                            |    8 +
 block/t10-pi.c                         |  249 +++++++++++----------------------
 drivers/md/dm-core.h                   |    1 
 drivers/md/dm-crypt.c                  |    4 
 drivers/md/dm-integrity.c              |   47 +-----
 drivers/md/dm-table.c                  |  161 +++------------------
 drivers/md/md.c                        |   72 ++-------
 drivers/md/md.h                        |    5 
 drivers/md/raid0.c                     |   28 +--
 drivers/md/raid1.c                     |   24 +--
 drivers/md/raid10.c                    |   10 -
 drivers/md/raid5.c                     |    2 
 drivers/nvdimm/btt.c                   |   13 -
 drivers/nvme/host/Kconfig              |    1 
 drivers/nvme/host/core.c               |   71 ++++-----
 drivers/nvme/host/multipath.c          |    3 
 drivers/nvme/target/Kconfig            |    1 
 drivers/nvme/target/io-cmd-bdev.c      |   16 +-
 drivers/scsi/Kconfig                   |    1 
 drivers/scsi/sd.c                      |    8 -
 drivers/scsi/sd.h                      |   12 -
 drivers/scsi/sd_dif.c                  |   45 ++---
 drivers/target/target_core_iblock.c    |   49 +++---
 include/linux/blk-integrity.h          |   62 ++------
 include/linux/blkdev.h                 |   25 ++-
 include/linux/t10-pi.h                 |   20 --
 33 files changed, 533 insertions(+), 868 deletions(-)

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2024-06-14  2:19 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05  6:28 move integrity settings to queue_limits Christoph Hellwig
2024-06-05  6:28 ` [PATCH 01/12] dm-integrity: use the nop integrity profile Christoph Hellwig
2024-06-05 14:52   ` Milan Broz
2024-06-06  4:45     ` Christoph Hellwig
2024-06-06  0:12   ` Chaitanya Kulkarni
2024-06-05  6:28 ` [PATCH 02/12] block: remove the unused BIP_{CTRL,DISK}_NOCHECK flags Christoph Hellwig
2024-06-05 16:16   ` Bart Van Assche
2024-06-05 23:31   ` Kanchan Joshi
2024-06-06  0:13   ` Chaitanya Kulkarni
2024-06-05  6:28 ` [PATCH 03/12] block: remove the BIP_IP_CHECKSUM flag Christoph Hellwig
2024-06-05 16:21   ` Bart Van Assche
2024-06-05 23:31   ` Kanchan Joshi
2024-06-06  0:14   ` Chaitanya Kulkarni
2024-06-05  6:28 ` [PATCH 04/12] block: remove the blk_integrity_profile structure Christoph Hellwig
2024-06-05 14:35   ` Kanchan Joshi
2024-06-06  4:49     ` Christoph Hellwig
2024-06-05 16:31   ` Bart Van Assche
2024-06-06  4:50     ` Christoph Hellwig
2024-06-06 15:38       ` Bart Van Assche
2024-06-05  6:28 ` [PATCH 05/12] block: remove the blk_flush_integrity call in blk_integrity_unregister Christoph Hellwig
2024-06-05  6:28 ` [PATCH 06/12] block: factor out flag_{store,show} helper for integrity Christoph Hellwig
2024-06-05 16:00   ` Keith Busch
2024-06-06  0:16   ` Chaitanya Kulkarni
2024-06-05  6:28 ` [PATCH 07/12] block: use kstrtoul in flag_store Christoph Hellwig
2024-06-05 16:00   ` Keith Busch
2024-06-06  0:16   ` Chaitanya Kulkarni
2024-06-05  6:28 ` [PATCH 08/12] block: don't pretend to generate/verify for non-PI metadata Christoph Hellwig
2024-06-05  6:28 ` [PATCH 09/12] block: don't require stable pages " Christoph Hellwig
2024-06-05  6:28 ` [PATCH 10/12] block: bypass the STABLE_WRITES flag for protection information Christoph Hellwig
2024-06-05  6:28 ` [PATCH 11/12] block: invert the BLK_INTEGRITY_{GENERATE,VERIFY} flags Christoph Hellwig
2024-06-06  0:20   ` Chaitanya Kulkarni
2024-06-05  6:28 ` [PATCH 12/12] block: move integrity information into queue_limits Christoph Hellwig
2024-06-05 16:56   ` Bart Van Assche
2024-06-06  4:51     ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2024-06-13  8:48 move integrity settings to queue_limits v3 Christoph Hellwig
2024-06-13  8:48 ` [PATCH 12/12] block: move integrity information into queue_limits Christoph Hellwig
2024-06-13 13:40   ` Hannes Reinecke
2024-06-14  2:18   ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).