public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH v3 1/8] block: fix zone write plug removal
Date: Fri, 27 Feb 2026 05:48:14 -0800	[thread overview]
Message-ID: <aaGgniwHscUGHvXu@infradead.org> (raw)
In-Reply-To: <20260227014951.2327711-2-dlemoal@kernel.org>

On Fri, Feb 27, 2026 at 10:49:44AM +0900, Damien Le Moal wrote:
>  again:
>  	zwplug = disk_get_zone_wplug(disk, sector);
>  	if (zwplug) {
> -		/*
> -		 * Check that a BIO completion or a zone reset or finish
> -		 * operation has not already removed the zone write plug from
> -		 * the hash table and dropped its reference count. In such case,
> -		 * we need to get a new plug so start over from the beginning.
> -		 */
>  		spin_lock_irqsave(&zwplug->lock, *flags);
> -		if (zwplug->flags & BLK_ZONE_WPLUG_UNHASHED) {
> -			spin_unlock_irqrestore(&zwplug->lock, *flags);
> -			disk_put_zone_wplug(zwplug);
> -			goto again;
> -		}
>  		return zwplug;

So this special case now simplify goes away, and we let writes to
reset/finished zoned go down the normal path, and then they'll hit the
incorrect write pointer check and error out.  Nice!

The entire patch looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

  parent reply	other threads:[~2026-02-27 13:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27  1:49 [PATCH v3 0/8] Improve zoned (SMR) HDD write throughput Damien Le Moal
2026-02-27  1:49 ` [PATCH v3 1/8] block: fix zone write plug removal Damien Le Moal
2026-02-27  9:22   ` Johannes Thumshirn
2026-02-27  9:40     ` Damien Le Moal
2026-02-27  9:44       ` Johannes Thumshirn
2026-02-27 13:48   ` Christoph Hellwig [this message]
2026-03-02  7:20   ` Hannes Reinecke
2026-02-27  1:49 ` [PATCH v3 2/8] block: fix zone write plugs refcount handling in disk_zone_wplug_schedule_bio_work() Damien Le Moal
2026-02-27  9:23   ` Johannes Thumshirn
2026-03-02  7:21   ` Hannes Reinecke
2026-02-27  1:49 ` [PATCH v3 3/8] block: rename and simplify disk_get_and_lock_zone_wplug() Damien Le Moal
2026-02-27  9:32   ` Johannes Thumshirn
2026-02-27 13:48   ` Christoph Hellwig
2026-03-02  7:22   ` Hannes Reinecke
2026-02-27  1:49 ` [PATCH v3 4/8] block: remove disk_zone_is_full() Damien Le Moal
2026-02-27  1:49 ` [PATCH v3 5/8] block: rename struct gendisk zone_wplugs_lock field Damien Le Moal
2026-02-27  1:49 ` [PATCH v3 6/8] block: allow submitting all zone writes from a single context Damien Le Moal
2026-02-27  9:41   ` Johannes Thumshirn
2026-03-02  7:23   ` Hannes Reinecke
2026-02-27  1:49 ` [PATCH v3 7/8] block: default to QD=1 writes for blk-mq rotational zoned devices Damien Le Moal
2026-02-27  9:48   ` Johannes Thumshirn
2026-02-27  1:49 ` [PATCH v3 8/8] Documentation: ABI: stable: document the zoned_qd1_writes attribute Damien Le Moal
2026-02-27  9:51   ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aaGgniwHscUGHvXu@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox