linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] blk-integrity: drop integrity_kobj from gendisk
@ 2023-03-18 17:36 Thomas Weißschuh
  2023-03-18 17:36 ` [PATCH v3 1/3] blk-integrity: use sysfs_emit Thomas Weißschuh
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2023-03-18 17:36 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, linux-kernel, Greg Kroah-Hartman, Martin K. Petersen,
	Christoph Hellwig, Thomas Weißschuh

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.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
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,
-- 
Thomas Weißschuh <linux@weissschuh.net>


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

end of thread, other threads:[~2023-04-27  6:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-18 17:36 [PATCH v3 0/3] blk-integrity: drop integrity_kobj from gendisk Thomas Weißschuh
2023-03-18 17:36 ` [PATCH v3 1/3] blk-integrity: use sysfs_emit Thomas Weißschuh
2023-03-20  6:14   ` Christoph Hellwig
2023-03-18 17:36 ` [PATCH v3 2/3] blk-integrity: convert to struct device_attribute Thomas Weißschuh
2023-03-20  6:14   ` Christoph Hellwig
2023-03-18 17:36 ` [PATCH v3 3/3] blk-integrity: register sysfs attributes on struct device Thomas Weißschuh
2023-03-20  6:15   ` Christoph Hellwig
2023-03-20 11:56 ` [PATCH v3 0/3] blk-integrity: drop integrity_kobj from gendisk Martin K. Petersen
2023-04-26 23:12   ` Thomas Weißschuh
2023-04-27  0:26     ` Jens Axboe
2023-04-27  6:00       ` Thomas Weißschuh
2023-04-27  0:26 ` Jens Axboe

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).