linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Thomas Weißschuh" <linux@weissschuh.net>
Subject: [PATCH v2 0/4] blk-integrity: drop integrity_kobj from gendisk
Date: Fri, 10 Mar 2023 22:40:01 +0000	[thread overview]
Message-ID: <20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net> (raw)

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 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 (4):
      blk-integrity: use sysfs_emit
      blk-integrity: convert to struct device_attribute
      blk-integrity: register sysfs attributes on struct device
      blk-integrity: drop integrity_kobj from gendisk

 block/blk-integrity.c  | 159 +++++++++++++++++--------------------------------
 include/linux/blkdev.h |   3 -
 2 files changed, 55 insertions(+), 107 deletions(-)
---
base-commit: 55a21105ecc156495446d8ae75d7d73f66baed7b
change-id: 20230309-kobj_release-gendisk_integrity-e26c0bc126aa

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


             reply	other threads:[~2023-03-10 22:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 22:40 Thomas Weißschuh [this message]
2023-03-10 22:40 ` [PATCH v2 1/4] blk-integrity: use sysfs_emit Thomas Weißschuh
2023-03-15 15:00   ` Christoph Hellwig
2023-03-10 22:40 ` [PATCH v2 2/4] blk-integrity: convert to struct device_attribute Thomas Weißschuh
2023-03-15 15:03   ` Christoph Hellwig
2023-03-18 16:54     ` Thomas Weißschuh
2023-03-10 22:40 ` [PATCH v2 3/4] blk-integrity: register sysfs attributes on struct device Thomas Weißschuh
2023-03-15 15:06   ` Christoph Hellwig
2023-03-18 16:56     ` Thomas Weißschuh
2023-03-10 22:40 ` [PATCH v2 4/4] blk-integrity: drop integrity_kobj from gendisk Thomas Weißschuh
2023-03-15 15:07   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230309-kobj_release-gendisk_integrity-v2-0-761a50d71900@weissschuh.net \
    --to=linux@weissschuh.net \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).