mbox series

[0/4] Zone write plugging fixes

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

Message

Damien Le Moal Dec. 6, 2024, 1:52 a.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.

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
  block: Prevent potential deadlocks in zone write plug error recovery
  dm: Fix dm-zoned-reclaim zone write pointer alignment

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

Comments

Damien Le Moal Dec. 6, 2024, 3:55 a.m. UTC | #1
On 12/6/24 10:52, 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.
> 
> 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 forgot to mention that 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.

> 
> 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
>   block: Prevent potential deadlocks in zone write plug error recovery
>   dm: Fix dm-zoned-reclaim zone write pointer alignment
> 
>  block/blk-zoned.c             | 507 +++++++++++++++-------------------
>  drivers/md/dm-zoned-reclaim.c |   4 +-
>  include/linux/blkdev.h        |   5 +-
>  3 files changed, 229 insertions(+), 287 deletions(-)
>