]> git.baikalelectronics.ru Git - kernel.git/commit
null_blk: Use blk_init_request_from_bio() instead of open-coding it
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 19 Apr 2017 21:01:25 +0000 (14:01 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 19 Apr 2017 23:38:31 +0000 (17:38 -0600)
commitf45b0b2b747470120135f266c030bbb4b1ab57c2
treecd6abe18d903d34a8b168b32be2990f75c5fb38d
parent8ef63ead539780ccb705a0373470694cb491ca9b
null_blk: Use blk_init_request_from_bio() instead of open-coding it

This patch changes the behavior of the null_blk driver for the
LightNVM mode as follows:
* REQ_FAILFAST_MASK is set for read-ahead requests.
* If no I/O priority has been set in the bio, the I/O priority is
  copied from the I/O context.
* The rq_disk member is initialized if bio->bi_bdev != NULL.
* req->errors is initialized to zero.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Matias Bjørling <m@bjorling.me>
Cc: Adam Manzanares <adam.manzanares@wdc.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/null_blk.c