Skip to content

Commit

Permalink
block: move the disk events code to a separate file
Browse files Browse the repository at this point in the history
Move the code for handling disk events from genhd.c into a new file
as it isn't very related to the rest of the file while at the same
time requiring lots of forward declarations.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Jun 24, 2021
1 parent 60b6a7e commit d5870ed
Show file tree
Hide file tree
Showing 4 changed files with 491 additions and 493 deletions.
3 changes: 2 additions & 1 deletion block/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ obj-$(CONFIG_BLOCK) := bio.o elevator.o blk-core.o blk-sysfs.o \
blk-exec.o blk-merge.o blk-timeout.o \
blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \
blk-mq-sysfs.o blk-mq-cpumap.o blk-mq-sched.o ioctl.o \
genhd.o ioprio.o badblocks.o partitions/ blk-rq-qos.o
genhd.o ioprio.o badblocks.o partitions/ blk-rq-qos.o \
disk-events.o

obj-$(CONFIG_BOUNCE) += bounce.o
obj-$(CONFIG_BLK_SCSI_REQUEST) += scsi_ioctl.o
Expand Down
5 changes: 5 additions & 0 deletions block/blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,9 @@ int bio_add_hw_page(struct request_queue *q, struct bio *bio,

struct request_queue *blk_alloc_queue(int node_id);

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

#endif /* BLK_INTERNAL_H */
Loading

0 comments on commit d5870ed

Please sign in to comment.