Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	Naohiro Aota <Naohiro.Aota@wdc.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: new scrub code vs zoned file systems
Date: Thu, 1 Jun 2023 13:04:42 +0800	[thread overview]
Message-ID: <e6ffff18-c51a-169d-35e8-e452dab81b22@gmx.com> (raw)
In-Reply-To: <20230601045302.GA22596@lst.de>



On 2023/6/1 12:53, Christoph Hellwig wrote:
> On Thu, Jun 01, 2023 at 06:25:59AM +0800, Qu Wenruo wrote:
>> To me, the problem can be solved in a much simpler way, if it's
>> dev-replace for zoned device, let's write the whole stripe to the target
>> device, and wait for it.
>>
>> For the btrfs_record_physical_zoned(), we can skip the OE things if
>> bbio::inode is NULL.
>>
>> Would the following change solves the problem?
>
> It can't, as we need to record the actually written location.

We don't need, it's scrub, the target block group is marked RO, and we
won't duplicate writes for zoned devices (the FLAG_TO_COPY thing), thus
only scrub can write into the zone.

Furthermore, in the context of scrub, we have always do write and wait
(QD=1, just like metadata writes), and fill the gaps using
fill_writer_pointer_gap() when needed.

In fact, if there is something so basically wrong, we should have all
the replace tests before that b/169 failed.

Thanks,
Qu

      reply	other threads:[~2023-06-01  5:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 12:52 new scrub code vs zoned file systems Christoph Hellwig
2023-05-31 13:10 ` Johannes Thumshirn
2023-05-31 13:20   ` Christoph Hellwig
2023-05-31 13:25     ` Johannes Thumshirn
2023-05-31 13:30       ` Christoph Hellwig
2023-05-31 14:04         ` Johannes Thumshirn
2023-05-31 14:17           ` Christoph Hellwig
2023-06-01  2:09             ` Qu Wenruo
2023-06-01  4:40               ` Christoph Hellwig
2023-06-01  5:00                 ` Qu Wenruo
2023-06-01  5:17                   ` Naohiro Aota
2023-06-01  5:21                     ` Naohiro Aota
2023-06-01  7:21                       ` Qu Wenruo
2023-06-01  7:27                         ` Christoph Hellwig
2023-06-01  8:46                           ` Qu Wenruo
2023-06-01  5:22                     ` Christoph Hellwig
2023-06-01  5:34                       ` Christoph Hellwig
2023-06-01  5:45                     ` Qu Wenruo
2023-06-01  5:47                       ` Christoph Hellwig
2023-05-31 22:25           ` Qu Wenruo
2023-05-31 22:48             ` Qu Wenruo
2023-06-01  4:53             ` Christoph Hellwig
2023-06-01  5:04               ` Qu Wenruo [this message]

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=e6ffff18-c51a-169d-35e8-e452dab81b22@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=hch@lst.de \
    --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