summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-01-03 21:11:30 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2020-01-03 21:11:30 +0100
commitb6b4aafc99d7c8dbf7d9429bf054b591daab1ad0 (patch)
treee385372876aa314701286d3c1e807a534840fc2b /drivers
parentMerge tag 'kbuild-fixes-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
parentnull_blk: Fix REQ_OP_ZONE_CLOSE handling (diff)
downloadlinux-b6b4aafc99d7c8dbf7d9429bf054b591daab1ad0.tar.xz
linux-b6b4aafc99d7c8dbf7d9429bf054b591daab1ad0.zip
Merge tag 'block-5.5-20200103' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "Three fixes in here: - Fix for a missing split on default memory boundary mask (4G) (Ming) - Fix for multi-page read bio truncate (Ming) - Fix for null_blk zone close request handling (Damien)" * tag 'block-5.5-20200103' of git://git.kernel.dk/linux-block: null_blk: Fix REQ_OP_ZONE_CLOSE handling block: fix splitting segments on boundary masks block: add bio_truncate to fix guard_bio_eod
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/null_blk_zoned.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/null_blk_zoned.c b/drivers/block/null_blk_zoned.c
index d4d88b581822..5cf49d9db95e 100644
--- a/drivers/block/null_blk_zoned.c
+++ b/drivers/block/null_blk_zoned.c
@@ -186,7 +186,10 @@ static blk_status_t null_zone_mgmt(struct nullb_cmd *cmd, enum req_opf op,
if (zone->cond == BLK_ZONE_COND_FULL)
return BLK_STS_IOERR;
- zone->cond = BLK_ZONE_COND_CLOSED;
+ if (zone->wp == zone->start)
+ zone->cond = BLK_ZONE_COND_EMPTY;
+ else
+ zone->cond = BLK_ZONE_COND_CLOSED;
break;
case REQ_OP_ZONE_FINISH:
if (zone->type == BLK_ZONE_TYPE_CONVENTIONAL)