mbox series

[v3,0/4] Zone write plugging fixes

Message ID 20241209122357.47838-1-dlemoal@kernel.org (mailing list archive)
Headers show
Series Zone write plugging fixes | expand

Message

Damien Le Moal Dec. 9, 2024, 12:23 p.m. UTC
Jens,

These patches address potential issues with zone write plugging.
The first 2 patches fix handling of REQ_NOWAIT BIOs as these can be
"failed" after going through the zone write plugging and changing the
target zone plug zone write pointer offset.

Patch 3 is a bigger fix and address a potential deadlock issue due to
the zone write plugging internally issuing zone report operations to
recover from write errors. This zone report operation is removed by this
patch and replaced with an automatic recovery when the BIO issuer
execute a zone report. This change in behavior results in a problem with
REQ_OP_WRITE_ZEROES handling and failures in the dm-zoned device mapper.
That is fixed in patch 4.

I will followup these fixes with a cleanup of the report zones API and
its callback function interface to clean it up as patch 4 introduces an
indirect user callback call that is not very pretty.

Changes from v2:
 - Added review tags from Christoph to patch 1 and 2.
 - Reversed the order of patch 3 and 4. Patch 3 now includes some code
   that was implemented in "block: Prevent potential deadlocks in zone
   write plug error recovery" in v2.
 - Adjusted and improved the commit messages of patch 3 and 4.

Changes from v1:
 - Fixed kdoc comment for blkdev_issue_zone_zeroout() in patch 4

Damien Le Moal (4):
  block: Use a zone write plug BIO work for REQ_NOWAIT BIOs
  block: Ignore REQ_NOWAIT for zone reset and zone finish operations
  dm: Fix dm-zoned-reclaim zone write pointer alignment
  block: Prevent potential deadlocks in zone write plug error recovery

 block/blk-zoned.c             | 506 +++++++++++++++-------------------
 drivers/md/dm-zoned-reclaim.c |   6 +-
 include/linux/blkdev.h        |   5 +-
 3 files changed, 229 insertions(+), 288 deletions(-)

Comments

Martin K. Petersen Dec. 10, 2024, 1:27 a.m. UTC | #1
Damien,

> These patches address potential issues with zone write plugging.
> The first 2 patches fix handling of REQ_NOWAIT BIOs as these can be
> "failed" after going through the zone write plugging and changing the
> target zone plug zone write pointer offset.
>
> Patch 3 is a bigger fix and address a potential deadlock issue due to
> the zone write plugging internally issuing zone report operations to
> recover from write errors. This zone report operation is removed by this
> patch and replaced with an automatic recovery when the BIO issuer
> execute a zone report. This change in behavior results in a problem with
> REQ_OP_WRITE_ZEROES handling and failures in the dm-zoned device mapper.
> That is fixed in patch 4.

Complicated set of fixes but they all look good to me.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Jens Axboe Dec. 10, 2024, 4:17 p.m. UTC | #2
On Mon, 09 Dec 2024 21:23:53 +0900, Damien Le Moal wrote:
> Jens,
> 
> These patches address potential issues with zone write plugging.
> The first 2 patches fix handling of REQ_NOWAIT BIOs as these can be
> "failed" after going through the zone write plugging and changing the
> target zone plug zone write pointer offset.
> 
> [...]

Applied, thanks!

[1/4] block: Use a zone write plug BIO work for REQ_NOWAIT BIOs
      commit: cae005670887cb07ceafc25bb32e221e56286488
[2/4] block: Ignore REQ_NOWAIT for zone reset and zone finish operations
      commit: 5eb3317aa5a2ffe4574ab1a12cf9bc9447ca26c0
[3/4] dm: Fix dm-zoned-reclaim zone write pointer alignment
      commit: b76b840fd93374240b59825f1ab8e2f5c9907acb
[4/4] block: Prevent potential deadlocks in zone write plug error recovery
      commit: fe0418eb9bd69a19a948b297c8de815e05f3cde1

Best regards,