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 13:06:02 -0500 [thread overview]
Message-ID: <46951C0A.4080505@sandeen.net> (raw)
In-Reply-To: <op.tvamambx3jf8g2@pc-bnaujok.melbourne.sgi.com>
Barry Naujok wrote:
> The attached patch zeros all the secondary superblocks if
> overwriting an existing XFS filesystem.
>
> This allows xfs_repair to detect the correct secondary block
> if the primary is destroyed (like XFS QA test 030).
Seems good to me (after filtering out all of the quilt-induced
whitespace changes ;-) )
+ /*
+ * perform same basic superblock validation to make sure we
+ * actually zero secondary blocks
+ */
+ 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.
If something goes wrong and the old found SB is full of junk, this is
non-fatal, right.
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?
Thanks,
-Eric
next prev parent reply other threads:[~2007-07-11 18:10 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 [this message]
2007-07-12 0:19 ` Barry Naujok
2007-07-12 2:35 ` Eric Sandeen
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=46951C0A.4080505@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox