diff options
author | Christoph Hellwig <hch@lst.de> | 2020-03-24 08:25:13 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-24 14:57:07 +0100 |
commit | 3ad5cee5cd000dc05e6c2410b06fc1d818e7b1e9 (patch) | |
tree | 9c23b9cb8c1538219ad6656abbef12ce26f307ea /block/blk.h | |
parent | block: move disk_name and related helpers out of partition-generic.c (diff) | |
download | linux-3ad5cee5cd000dc05e6c2410b06fc1d818e7b1e9.tar.xz linux-3ad5cee5cd000dc05e6c2410b06fc1d818e7b1e9.zip |
block: move sysfs methods shared by disks and partitions to genhd.c
Move the sysfs _show methods that are used both on the full disk and
partition nodes to genhd.c instead of hiding them in the partitioning
code. Also move the declaration for these methods to block/blk.h so
that we don't expose them to drivers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h index 670337b7cfa0..43df9dcb3d4e 100644 --- a/block/blk.h +++ b/block/blk.h @@ -214,6 +214,17 @@ static inline void elevator_exit(struct request_queue *q, struct hd_struct *__disk_get_part(struct gendisk *disk, int partno); +ssize_t part_size_show(struct device *dev, struct device_attribute *attr, + char *buf); +ssize_t part_stat_show(struct device *dev, struct device_attribute *attr, + char *buf); +ssize_t part_inflight_show(struct device *dev, struct device_attribute *attr, + char *buf); +ssize_t part_fail_show(struct device *dev, struct device_attribute *attr, + char *buf); +ssize_t part_fail_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count); + #ifdef CONFIG_FAIL_IO_TIMEOUT int blk_should_fake_timeout(struct request_queue *); ssize_t part_timeout_show(struct device *, struct device_attribute *, char *); |