From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v2 2/5] xfs_repair: better checking of v5 metadata fields
Date: Mon, 1 Jun 2015 07:32:19 +1000 [thread overview]
Message-ID: <20150531213219.GF24666@dastard> (raw)
In-Reply-To: <20150527054450.GA10175@birch.djwong.org>
On Tue, May 26, 2015 at 10:44:50PM -0700, Darrick J. Wong wrote:
> Check the UUID, owner, and block number fields during repair, looking for
> blocks that fail either the checksum or the data structure verifiers. For
> directories we can simply rebuild corrupt/broken index data, though for
> anything else we have to toss out the broken object.
>
> v2: Refactor the directory block header checks into a single function.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
FYI, just a couple of quick whitespacy things, which I've fixed on
commit.
> diff --git a/repair/phase6.c b/repair/phase6.c
> index c09b394..7dd868c 100644
> --- a/repair/phase6.c
> +++ b/repair/phase6.c
> @@ -1925,6 +1925,69 @@ _("entry \"%s\" in dir inode %" PRIu64 " inconsistent with .. value (%" PRIu64 "
> freetab->ents[db].s = 0;
> }
>
> +/* check v5 metadata */
> +static int
> +__check_dir3_header(
> + xfs_mount_t *mp,
> + xfs_buf_t *bp,
Don't use the typedef versions - struct xfs_mount. No need for quite
so much whitespace, either - this sort of thing is fine if there's
no need for larger alignment steps:
struct xfs_mount *mp,
struct xfs_buf *bp,
....
> + /* verify uuid */
> + if (platform_uuid_compare(uuid,
> + &mp->m_sb.sb_uuid) != 0) {
No need to split that line.
> +static int
> +check_da3_header(
> + xfs_mount_t *mp,
> + xfs_buf_t *bp,
> + xfs_ino_t ino)
> +{
> + struct xfs_da3_blkinfo *info;
> +
> + info = bp->b_addr;
struct xfs_da3_blkinfo *info = bp->b_addr;
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-05-31 21:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 22:51 [PATCH 0/5] xfsprogs May 2015 patchbomb Darrick J. Wong
2015-05-26 22:51 ` [PATCH 1/5] xfs_repair: refuse to run if we don't recognize version or feature flags Darrick J. Wong
2015-05-26 23:49 ` Eric Sandeen
2015-05-27 5:45 ` [PATCH v2 " Darrick J. Wong
2015-05-27 14:54 ` Eric Sandeen
2015-05-27 15:16 ` Eric Sandeen
2015-05-27 15:27 ` Eric Sandeen
2015-05-27 16:04 ` Fanael Linithien
2015-05-27 16:26 ` Eric Sandeen
2015-05-27 17:17 ` Darrick J. Wong
2015-05-27 15:19 ` Fanael Linithien
2015-05-27 16:42 ` Darrick J. Wong
2015-05-27 18:15 ` [PATCH v3 " Darrick J. Wong
2015-05-27 18:42 ` Fanael Linithien
2015-05-26 22:51 ` [PATCH 2/5] xfs_repair: better checking of v5 metadata fields Darrick J. Wong
2015-05-26 23:58 ` Dave Chinner
2015-05-27 5:44 ` [PATCH v2 " Darrick J. Wong
2015-05-31 21:32 ` Dave Chinner [this message]
2015-05-26 22:51 ` [PATCH 3/5] xfs_repair: ensure .. is set to a sane ino value when rebuilding dir Darrick J. Wong
2015-05-26 22:51 ` [PATCH 4/5] xfs_db: enable blockget for v5 filesystems Darrick J. Wong
2015-05-26 23:07 ` Eric Sandeen
2015-05-26 23:13 ` Darrick J. Wong
2015-05-26 23:14 ` [PATCH v2 " Darrick J. Wong
2015-05-26 22:51 ` [PATCH 5/5] xfs_db: enable blocktrash for checksummed filesystems Darrick J. Wong
2015-05-28 5:08 ` Darrick J. Wong
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=20150531213219.GF24666@dastard \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.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