diff options
| author | Damien Le Moal <[email protected]> | 2025-06-11 00:59:15 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-06-11 12:42:07 +0000 |
| commit | f705d33c2f0353039d03e5d6f18f70467d86080e (patch) | |
| tree | 601d916f32df9d52e78d51dbac577e283a54c294 | |
| parent | ublk: document auto buffer registration(UBLK_F_AUTO_BUF_REG) (diff) | |
| download | kernel-f705d33c2f0353039d03e5d6f18f70467d86080e.tar.gz kernel-f705d33c2f0353039d03e5d6f18f70467d86080e.zip | |
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: 9b1ce7f0c6f8 ("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]>
| -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 8f15d1aa6eb8..cee7a0774a9b 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -1225,6 +1225,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); } /* |
