Skip to content

Commit 943801c

Browse files
damien-lemoalgregkh
authored andcommitted
block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion
commit f705d33 upstream. 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: stable@vger.kernel.org Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250611005915.89843-1-dlemoal@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5538af3 commit 943801c

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
@@ -1240,6 +1240,7 @@ void blk_zone_write_plug_bio_endio(struct bio *bio)
12401240
if (bio_flagged(bio, BIO_EMULATES_ZONE_APPEND)) {
12411241
bio->bi_opf &= ~REQ_OP_MASK;
12421242
bio->bi_opf |= REQ_OP_ZONE_APPEND;
1243+
bio_clear_flag(bio, BIO_EMULATES_ZONE_APPEND);
12431244
}
12441245

12451246
/*

0 commit comments

Comments
 (0)