diff options
author | 2021-06-24 09:38:43 +0200 | |
---|---|---|
committer | 2021-06-24 12:00:22 -0600 | |
commit | 2bc8cda5ea4b42ff78be1b11011092d57b424d37 (patch) | |
tree | 538072bbb7ef09753ad66de333655a608a676069 /block/blk.h | |
parent | block: move the disk events code to a separate file (diff) | |
download | linux-2bc8cda5ea4b42ff78be1b11011092d57b424d37.tar.gz linux-2bc8cda5ea4b42ff78be1b11011092d57b424d37.tar.bz2 linux-2bc8cda5ea4b42ff78be1b11011092d57b424d37.zip |
block: add the events* attributes to disk_attrs
Add the events attributes to the disk_attrs array, which ensures they are
added by the driver core when the device is created rather than adding
them after the device has been added, which is racy versus uevents and
requires more boilerplate code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20210624073843.251178-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h index f8d726429906..4fcd7a032377 100644 --- a/block/blk.h +++ b/block/blk.h @@ -364,5 +364,8 @@ void disk_alloc_events(struct gendisk *disk); void disk_add_events(struct gendisk *disk); void disk_del_events(struct gendisk *disk); void disk_release_events(struct gendisk *disk); +extern struct device_attribute dev_attr_events; +extern struct device_attribute dev_attr_events_async; +extern struct device_attribute dev_attr_events_poll_msecs; #endif /* BLK_INTERNAL_H */ |