Skip to content

blk-integrity: drop integrity_kobj from gendisk

Thomas Weißschuh linux-block lkml 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am 20230309-kobj_release-gendisk_integrity-v3-0-ceccb4493c46@weissschuh.net change-id 20230309-kobj_release-gendisk_integrity-e26c0bc126aa

Versions newest first

  1. v3 Latest3 patches 8 repliesApplied
  2. v24 patches 6 repliesSuperseded
  3. v11 patch 8 repliesSuperseded

Changes in v3 from the cover letter

- Style cleanups
- Register attributes directly via disk_attr_groups
- Link to v2: https://lore.kernel.org/r/20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3blk-integrity: use sysfs_emitblock/blk-integrity.c+9 -101 reply
2/3blk-integrity: convert to struct device_attributeblock/blk-integrity.c+62 -651 reply
3/3blk-integrity: register sysfs attributes on struct deviceblock/blk-integrity.c block/blk.h block/genhd.c +1 more+8 -721 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChristoph HellwigMartin K. Petersen
SeriesR-b
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] blk-integrity: drop integrity_kobj from gendisk

The embedded member integrity_kobj member of struct gendisk violates the assumption of the driver core that only one struct kobject should be embedded into another object and then manages its lifetime.

As the integrity_kobj is only used to hold a few sysfs attributes it can be replaced by direct device_attributes and removed.

---
Changes in v3:
- Style cleanups
- Register attributes directly via disk_attr_groups
- Link to v2: https://lore.kernel.org/r/20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net

Changes in v2:
- Get rid of integrity_kobj completely
- Migrate to sysfs_emit helper
- Link to v1: https://lore.kernel.org/r/20230309-kobj_release-gendisk_integrity-v1-1-a240f54eac60@weissschuh.net

---
Thomas Weißschuh (3):
blk-integrity: use sysfs_emit
blk-integrity: convert to struct device_attribute
blk-integrity: register sysfs attributes on struct device

 block/blk-integrity.c  | 175 +++++++++++++++++--------------------------------
 block/blk.h            |  10 +--
 block/genhd.c          |  12 ++--
 include/linux/blkdev.h |   3 -
 4 files changed, 66 insertions(+), 134 deletions(-)

---
base-commit: 478a351ce0d69cef2d2bf2a686a09b356b63a66c
change-id: 20230309-kobj_release-gendisk_integrity-e26c0bc126aa

Best regards,

Signature · 1 line
Thomas Weißschuh <[email protected]>