From: Eric Sandeen <sandeen@sandeen.net>
To: Barry Naujok <bnaujok@sgi.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>, xfs-dev <xfs-dev@sgi.com>
Subject: Re: REVIEW: zero existing secondary superblocks with mkfs.xfs -f
Date: Wed, 11 Jul 2007 21:35:46 -0500 [thread overview]
Message-ID: <46959382.5060309@sandeen.net> (raw)
In-Reply-To: <op.tvbsh9z43jf8g2@pc-bnaujok.melbourne.sgi.com>
Barry Naujok wrote:
> On Thu, 12 Jul 2007 04:06:02 +1000, Eric Sandeen <sandeen@sandeen.net>
> wrote:
>> + if (sb.sb_magicnum != XFS_SB_MAGIC || sb.sb_blocksize == 0)
>> + goto done;
>>
>> Is there any chance we'd be here if the first test weren't already true?
>> *shrug* harmless though I guess.
>
> It's quite easy to get there if you run mkfs.xfs -f on non-XFS
> filesystem.
Oh, duh. Of course.
>> If something goes wrong and the old found SB is full of junk, this is
>> non-fatal, right.
>
> Yep. Worst that will happen is the pwrite loop fails, and if so, it
> stops and exits. Maybe one subtle enhancement is to make sure the
> pwrite loop doesn't extend beyond the new filesystem size.
>
>> Out of curiosity, why not just call verify_sb for the sanity checks
>> instead of recreating a subset of them in zero_old_xfs_structures?
>
> Because that code is in xfs_repair and not mkfs. With mkfs.xfs, we
> don't really care if anything else in the SB is bad.
Maybe a libxfs candidate? But, ok. Just a thought. :)
-Eric
> Barry.
>
prev parent reply other threads:[~2007-07-12 2:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 9:07 REVIEW: zero existing secondary superblocks with mkfs.xfs -f Barry Naujok
2007-07-11 18:06 ` Eric Sandeen
2007-07-12 0:19 ` Barry Naujok
2007-07-12 2:35 ` Eric Sandeen [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=46959382.5060309@sandeen.net \
--to=sandeen@sandeen.net \
--cc=bnaujok@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.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 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.