• C
    block: replace bi_bdev with a gendisk pointer and partitions index · 74d46992
    Christoph Hellwig 提交于
    This way we don't need a block_device structure to submit I/O.  The
    block_device has different life time rules from the gendisk and
    request_queue and is usually only available when the block device node
    is open.  Other callers need to explicitly create one (e.g. the lightnvm
    passthrough code, or the new nvme multipathing code).
    
    For the actual I/O path all that we need is the gendisk, which exists
    once per block device.  But given that the block layer also does
    partition remapping we additionally need a partition index, which is
    used for said remapping in generic_make_request.
    
    Note that all the block drivers generally want request_queue or
    sometimes the gendisk, so this removes a layer of indirection all
    over the stack.
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    74d46992
bio-integrity.c 13.7 KB