public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] genhd: implement device_add_disk_with_groups()
@ 2018-07-25  6:28 Hannes Reinecke
  2018-07-25  6:28 ` [PATCH 1/5] genhd: drop 'bool' argument from __device_add_disk() Hannes Reinecke
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Hannes Reinecke @ 2018-07-25  6:28 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Keith Busch, Sagi Grimberg, linux-block,
	linux-nvme, Martin Wilck, Hannes Reinecke

When creating a block device some drivers need to create additional sysfs
groups to store driver-specific informations.
With the current workflow of adding these groups with a separate call to
sysfs after the device has been created we are introducing a race with udev,
as the uevent is generated before the sysfs attributes are created, and udev
fails to read the required information.

This patchset adds a new function 'device_add_disk_with_groups()' and converts
the obvious candidates to use this new function.

As usual, comments and reviews are welcome.

Hannes Reinecke (5):
  genhd: drop 'bool' argument from __device_add_disk()
  block: genhd: add device_add_disk_with_groups
  nvme: register ns_id attributes as default sysfs groups
  aoe: use device_add_disk_with_groups()
  zram: use device_add_disk_with_groups()

 block/genhd.c                 | 38 ++++++++++++++++++++++++++++++--------
 drivers/block/aoe/aoe.h       |  1 -
 drivers/block/aoe/aoeblk.c    | 21 +++++++--------------
 drivers/block/aoe/aoedev.c    |  1 -
 drivers/block/zram/zram_drv.c | 28 +++++++---------------------
 drivers/nvme/host/core.c      | 14 +++++++-------
 drivers/nvme/host/multipath.c | 12 +++---------
 drivers/nvme/host/nvme.h      |  2 +-
 include/linux/genhd.h         |  3 +++
 9 files changed, 58 insertions(+), 62 deletions(-)

-- 
2.12.3

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

end of thread, other threads:[~2018-07-25  8:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-25  6:28 [PATCH 0/5] genhd: implement device_add_disk_with_groups() Hannes Reinecke
2018-07-25  6:28 ` [PATCH 1/5] genhd: drop 'bool' argument from __device_add_disk() Hannes Reinecke
2018-07-25  7:45   ` Christoph Hellwig
2018-07-25  6:28 ` [PATCH 2/5] block: genhd: add device_add_disk_with_groups Hannes Reinecke
2018-07-25  7:46   ` Christoph Hellwig
2018-07-25  8:27     ` Martin Wilck
2018-07-25  6:28 ` [PATCH 3/5] nvme: register ns_id attributes as default sysfs groups Hannes Reinecke
2018-07-25  6:28 ` [PATCH 4/5] aoe: use device_add_disk_with_groups() Hannes Reinecke
2018-07-25  6:28 ` [PATCH 5/5] zram: " Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox