Skip to content

Commit f705d33

Browse files
damien-lemoalaxboe
authored andcommitted
block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion
When blk_zone_write_plug_bio_endio() is called for a regular write BIO used to emulate a zone append operation, that is, a BIO flagged with BIO_EMULATES_ZONE_APPEND, the BIO operation code is restored to the original REQ_OP_ZONE_APPEND but the BIO_EMULATES_ZONE_APPEND flag is not cleared. Clear it to fully return the BIO to its orginal definition. Fixes: 9b1ce7f ("block: Implement zone append emulation") Cc: [email protected] Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent ff20c51 commit f705d33

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

block/blk-zoned.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,7 @@ void blk_zone_write_plug_bio_endio(struct bio *bio)
12251225
if (bio_flagged(bio, BIO_EMULATES_ZONE_APPEND)) {
12261226
bio->bi_opf &= ~REQ_OP_MASK;
12271227
bio->bi_opf |= REQ_OP_ZONE_APPEND;
1228+
bio_clear_flag(bio, BIO_EMULATES_ZONE_APPEND);
12281229
}
12291230

12301231
/*

0 commit comments

Comments
 (0)