From: Filipe Manana <fdmanana@kernel.org>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Zorro Lang <zlang@redhat.com>,
linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH] common/rc: don't clear superblock for zoned scratch pools
Date: Thu, 23 Feb 2023 17:01:14 +0000 [thread overview]
Message-ID: <CAL3q7H4gkVfb03+SB6-FzxFH+6aVu2MUM9ZTRVhYi_8d7m4+ig@mail.gmail.com> (raw)
In-Reply-To: <20230223154035.296702-1-johannes.thumshirn@wdc.com>
On Thu, Feb 23, 2023 at 3:56 PM Johannes Thumshirn
<johannes.thumshirn@wdc.com> wrote:
>
> _require_scratch_dev_pool() zeros the first 100 sectors of each device to
> clear eventual remains of older filesystems.
>
> On zoned devices this creates all sorts of problems, so just skip the
> clearing there.
What kind of problems? Can you give 1 or 2 examples at least?
And it would be nice to comment in the code why we don't zero the
sectors for zoned devices.
Thanks.
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
> common/rc | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/common/rc b/common/rc
> index 654730b21ead..d763501be2b2 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3461,7 +3461,9 @@ _require_scratch_dev_pool()
> fi
> # to help better debug when something fails, we remove
> # traces of previous btrfs FS on the dev.
> - dd if=/dev/zero of=$i bs=4096 count=100 > /dev/null 2>&1
> + if [ "`_zone_type "$i"`" = "none" ]; then
> + dd if=/dev/zero of=$i bs=4096 count=100 > /dev/null 2>&1
> + fi
> done
> }
>
> --
> 2.39.1
>
next prev parent reply other threads:[~2023-02-23 17:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 15:40 [PATCH] common/rc: don't clear superblock for zoned scratch pools Johannes Thumshirn
2023-02-23 17:01 ` Filipe Manana [this message]
2023-02-24 9:25 ` Johannes Thumshirn
2023-02-24 7:26 ` Naohiro Aota
2023-02-24 9:23 ` Johannes Thumshirn
2023-02-24 13:40 ` Zorro Lang
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=CAL3q7H4gkVfb03+SB6-FzxFH+6aVu2MUM9ZTRVhYi_8d7m4+ig@mail.gmail.com \
--to=fdmanana@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=zlang@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).