diff options
author | Matias Bjørling <m@bjorling.me> | 2016-01-12 07:49:21 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-01-12 08:21:16 -0700 |
commit | 91276162de9476b8ff32d9452e849210e5dd09e9 (patch) | |
tree | 53337c60f7d863b1ab733f9bcd4964da818f9057 /drivers/block | |
parent | abd805ec9f51f37db9da63dda44c3f4b4ae8ad57 (diff) | |
download | talos-obmc-linux-91276162de9476b8ff32d9452e849210e5dd09e9.tar.gz talos-obmc-linux-91276162de9476b8ff32d9452e849210e5dd09e9.zip |
lightnvm: refactor end_io functions for sync
To implement sync I/O support within the LightNVM core, the end_io
functions are refactored to take an end_io function pointer instead of
testing for initialized media manager, followed by calling its end_io
function.
Sync I/O can then be implemented using a callback that signal I/O
completion. This is similar to the logic found in blk_to_execute_io().
By implementing it this way, the underlying device I/Os submission logic
is abstracted away from core, targets, and media managers.
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/null_blk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 09e3c0d87ecc..e6cad40a248f 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -436,9 +436,8 @@ static void null_del_dev(struct nullb *nullb) static void null_lnvm_end_io(struct request *rq, int error) { struct nvm_rq *rqd = rq->end_io_data; - struct nvm_dev *dev = rqd->dev; - dev->mt->end_io(rqd, error); + nvm_end_io(rqd, error); blk_put_request(rq); } |