OSDN Git Service

block: add blk_alloc_disk and blk_cleanup_disk APIs
authorChristoph Hellwig <hch@lst.de>
Fri, 21 May 2021 05:50:55 +0000 (07:50 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Jun 2021 13:42:23 +0000 (07:42 -0600)
commitf525464a8000f092c20b00eead3eaa9d849c599e
tree6a05793a03d8cf7c52635e886f73203633329cbe
parent958229a7c55f219b1cff99f939dabbc1b6ba7161
block: add blk_alloc_disk and blk_cleanup_disk APIs

Add two new APIs to allocate and free a gendisk including the
request_queue for use with BIO based drivers.  This is to avoid
boilerplate code in drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20210521055116.1053587-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c
include/linux/genhd.h