Re: [PATCH 12/12] block: move integrity information into queue_limits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/13/24 10:48, Christoph Hellwig wrote:
Move the integrity information into the queue limits so that it can be
set atomically with other queue limits, and that the sysfs changes to
the read_verify and write_generate flags are properly synchronized.
This also allows to provide a more useful helper to stack the integrity
fields, although it still is separate from the main stacking function
as not all stackable devices want to inherit the integrity settings.
Even with that it greatly simplifies the code in md and dm.

Note that the integrity field is moved as-is into the queue limits.
While there are good arguments for removing the separate blk_integrity
structure, this would cause a lot of churn and might better be done at a
later time if desired.  However the integrity field in the queue_limits
structure is now unconditional so that various ifdefs can be avoided or
replaced with IS_ENABLED().  Given that tiny size of it that seems like
a worthwhile trade off.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
  Documentation/block/data-integrity.rst |  49 +-------
  block/blk-integrity.c                  | 124 ++-----------------
  block/blk-settings.c                   | 118 +++++++++++++++++-
  block/t10-pi.c                         |  12 +-
  drivers/md/dm-core.h                   |   1 -
  drivers/md/dm-integrity.c              |  27 ++---
  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/core.c               |  70 +++++------
  drivers/scsi/sd.c                      |   8 +-
  drivers/scsi/sd.h                      |  12 +-
  drivers/scsi/sd_dif.c                  |  34 +++---
  include/linux/blk-integrity.h          |  27 ++---
  include/linux/blkdev.h                 |  12 +-
  include/linux/t10-pi.h                 |  12 +-
  21 files changed, 289 insertions(+), 497 deletions(-)

Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@xxxxxxx                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux