Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: hch <hch@lst.de>
To: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: hch <hch@lst.de>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	Naohiro Aota <Naohiro.Aota@wdc.com>
Subject: Re: [PATCH] btrfs: zoned: don't zone append to conventional zone
Date: Tue, 2 Dec 2025 14:44:13 +0100	[thread overview]
Message-ID: <20251202134413.GA25716@lst.de> (raw)
In-Reply-To: <f746ae11-f29d-4b6f-b2c2-1fcd63713c24@wdc.com>

On Tue, Dec 02, 2025 at 01:43:07PM +0000, Johannes Thumshirn wrote:
> On 12/2/25 2:29 PM, Christoph Hellwig wrote:
> > On Tue, Dec 02, 2025 at 11:16:31AM +0100, Johannes Thumshirn wrote:
> >> In case of a zoned RAID, it can happen that a data write is targeting a
> >> sequential write required zone and a conventional zone. In this case the
> >> bio will be marked as REQ_OP_ZONE_APPEND but for the conventional zone,
> >> this needs to be REQ_OP_WRITE.
> >>
> >> This is a partial revert of commit d5e4377d5051 ("btrfs: split zone append
> >> bios in btrfs_submit_bio") which was introduced before zoned RAID.
> > Hmm, how does the BLOCK_GROUP_FLAG_SEQUENTIAL_ZONE flag used by
> > btrfs_use_zone_append actually work for the raid code?
> 
> 
> If one of the zones backing the block-group is sequential the flag is 
> set, see btrfs_load_block_group_zone_info().
> 
> > Either way, this is a bit ugly as we now special case zone append in
> > multiple places.  Can we just pass the use_append flag down to
> > btrfs_submit_dev_bio and only set REQ_OP_ZONE_APPEND there to keep it
> > all tidy?
> Let me have a look how we can make that non-ugly. Or just use 
> btrfs_dev_is_sequential() in btrfs_submit_dev_bio(), which is probably 
> nicer as it doesn't need a rbtree lookup for the block-group.

Well, it still needs to check all the other conditions that prohibit
using zone append (metadata, reloc inode, ...)

  reply	other threads:[~2025-12-02 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 10:16 [PATCH] btrfs: zoned: don't zone append to conventional zone Johannes Thumshirn
2025-12-02 13:29 ` Christoph Hellwig
2025-12-02 13:43   ` Johannes Thumshirn
2025-12-02 13:44     ` hch [this message]
2025-12-02 13:50       ` 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=20251202134413.GA25716@lst.de \
    --to=hch@lst.de \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=linux-btrfs@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