All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Damien Le Moal <dlemoal@kernel.org>
Subject: Re: [PATCH 4/4] blk-zoned: Move code from disk_zone_wplug_add_bio() into its caller
Date: Tue, 11 Nov 2025 08:53:18 +0100	[thread overview]
Message-ID: <20251111075318.GD6596@lst.de> (raw)
In-Reply-To: <20251110223003.2900613-5-bvanassche@acm.org>

On Mon, Nov 10, 2025 at 02:30:02PM -0800, Bart Van Assche wrote:
>  plug:
> +	schedule_bio_work = !(zwplug->flags & BLK_ZONE_WPLUG_PLUGGED);
> +	zwplug->flags |= BLK_ZONE_WPLUG_PLUGGED;
> +
>  	disk_zone_wplug_add_bio(disk, zwplug, bio, nr_segs);
> +	if (schedule_bio_work)
> +		disk_zone_wplug_schedule_bio_work(disk, zwplug);

Given that the new disk_zone_wplug_add_bio does not touch
BLK_ZONE_WPLUG_PLUGGED, this reads odd.  Why not:

 	disk_zone_wplug_add_bio(disk, zwplug, bio, nr_segs);
	if (!(zwplug->flags & BLK_ZONE_WPLUG_PLUGGED)) {
		zwplug->flags |= BLK_ZONE_WPLUG_PLUGGED;
		disk_zone_wplug_schedule_bio_work(disk, zwplug);
	}

and do away with the extra variable?

  parent reply	other threads:[~2025-11-11  7:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 22:29 [PATCH 0/4] Zoned block device code refactoring Bart Van Assche
2025-11-10 22:29 ` [PATCH 1/4] blk-zoned: Fix a typo in a source code comment Bart Van Assche
2025-11-11  1:49   ` Chaitanya Kulkarni
2025-11-11  7:06   ` Damien Le Moal
2025-11-11  7:49   ` Christoph Hellwig
2025-11-11 20:29     ` Bart Van Assche
2025-11-10 22:30 ` [PATCH 2/4] blk-zoned: Document disk_zone_wplug_schedule_bio_work() locking Bart Van Assche
2025-11-11  1:49   ` Chaitanya Kulkarni
2025-11-11  7:07   ` Damien Le Moal
2025-11-10 22:30 ` [PATCH 3/4] blk-zoned: Split an if-statement Bart Van Assche
2025-11-11  1:50   ` Chaitanya Kulkarni
2025-11-11  7:09   ` Damien Le Moal
2025-11-11  7:50     ` Christoph Hellwig
2025-11-10 22:30 ` [PATCH 4/4] blk-zoned: Move code from disk_zone_wplug_add_bio() into its caller Bart Van Assche
2025-11-11  7:16   ` Damien Le Moal
2025-11-11  7:53   ` Christoph Hellwig [this message]
2025-11-11 20:51     ` Bart Van Assche

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=20251111075318.GD6596@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.