[dm-devel] [PATCH v3 08/11] block: Improve zone reset execution

Hannes Reinecke hare at suse.de
Fri Oct 12 07:39:53 UTC 2018


On 10/12/18 4:30 AM, Damien Le Moal wrote:
> There is no need to synchronously execute all REQ_OP_ZONE_RESET BIOs
> necessary to reset a range of zones. Similarly to what is done for
> discard BIOs in blk-lib.c, all zone reset BIOs can be chained and
> executed asynchronously and a synchronous call done only for the last
> BIO of the chain.
> 
> Modify blkdev_reset_zones() to operate similarly to
> blkdev_issue_discard() using the next_bio() helper for chaining BIOs. To
> avoid code duplication of that function in blk_zoned.c, rename
> next_bio() into blk_next_bio() and declare it as a block internal
> function in blk.h.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal at wdc.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> ---
>   block/blk-lib.c   | 13 ++++++-------
>   block/blk-zoned.c | 29 ++++++++++++++++-------------
>   block/blk.h       |  2 ++
>   3 files changed, 24 insertions(+), 20 deletions(-)
> 
Neat.

Reviewed-by: Hannes Reinecke <hare at suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare at suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)




More information about the dm-devel mailing list