]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
null_blk: create a helper for zoned devices
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Fri, 23 Aug 2019 04:45:18 +0000 (21:45 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Aug 2019 12:58:05 +0000 (06:58 -0600)
commitfceb5d1b19cbe6263f09dbe8e8138edf02eb6e6b
treea9ac7e571d1e33efcce191de63ed75e1dafebf25
parent7ea88e229e9df18ecd624b0d39f3dba87432ba33
null_blk: create a helper for zoned devices

This patch creates a helper function for handling zoned block device
operations.

This patch also restructured the code for null_blk_zoned.c and uses the
pattern to return blk_status_t and catch the error in the function
null_handle_cmd() into cmd->error variable instead of setting it up in
the deeper layer just like the way it is done for flush, badblocks and
memory backed case in the null_handle_cmd(). We also move
null_handle_zoned() to the null_blk_zoned.c to keep the zoned code
separate.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk.h
drivers/block/null_blk_main.c
drivers/block/null_blk_zoned.c