diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2025-06-11 09:59:15 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-27 11:11:19 +0100 |
commit | 943801c3800594b1ae04a2746ec50effa2f6df49 (patch) | |
tree | 5775cb3292594fcac7c8fac232dba2249a665ca4 | |
parent | 5538af384318bd099728f45f912b09d1932f2c3c (diff) |
block: Clear BIO_EMULATES_ZONE_APPEND flag on BIO completion
commit f705d33c2f0353039d03e5d6f18f70467d86080e 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: 9b1ce7f0c6f8 ("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>
-rw-r--r-- | block/blk-zoned.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 164ded9eb144..d84946eb2f21 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -1240,6 +1240,7 @@ void blk_zone_write_plug_bio_endio(struct bio *bio) if (bio_flagged(bio, BIO_EMULATES_ZONE_APPEND)) { bio->bi_opf &= ~REQ_OP_MASK; bio->bi_opf |= REQ_OP_ZONE_APPEND; + bio_clear_flag(bio, BIO_EMULATES_ZONE_APPEND); } /* |