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@xxxxxxxxxx> 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@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs