From: Christoph Hellwig <hch@infradead.org>
To: Barry Naujok <bnaujok@sgi.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: REVIEW: xfs_repair fixes for bad directories
Date: Tue, 26 Aug 2008 15:32:05 -0400 [thread overview]
Message-ID: <20080826193205.GA31105@infradead.org> (raw)
In-Reply-To: <op.udlsirmx3jf8g2@pc-bnaujok.melbourne.sgi.com>
On Tue, Jul 01, 2008 at 06:00:17PM +1000, Barry Naujok wrote:
> Two issues have been encounted with xfs_repair and badly corrupted
> directories.
>
> 1. A huge size (inode di_size) can cause malloc which will fail.
> Patch dir_size_check.patch checks for a valid directory size
> and if it's bad, junks the directory. The di_size for a dir
> only counts the data blocks being used, not all the other
> associated metadata. This is limited to 32GB by the
> XFS_DIR2_LEAF_OFFSET value in XFS. Anything greater than this
> must be invalid.
As menioned before this one is trivial nad makes sens.
> 2. An update a while ago to xfs_repair attempts to fix invalid
> ".." entries for subdirectories where there is a valid parent
> with the appropriate entry. It was a partial fix that never
> did the full job, especially if the subdirectory was short-
> form or it has already been processed.
>
> Patch fix_dir_rebuild_without_dotdot_entry.patch creates a
> post-processing queue after the main scan to update any
> directories with an invalid ".." entry.
Where is the existing attemp? I can't find code doing anything like
that removed in the patch. But the actual patch looks good, while
I had this mess with the tons of different boolean flags in repair
converting these to a more descriptive bitmask should be a different
patch.
> Both these patches sit on top of the dinode.patch that has been
> posted out for review previously.
But you didn't get a review for it, did you? Looked over it briefly
and it looks good to m. Again the new code is much much mor readable.
next prev parent reply other threads:[~2008-08-26 19:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 8:00 REVIEW: xfs_repair fixes for bad directories Barry Naujok
2008-07-01 8:13 ` Christoph Hellwig
2008-08-26 2:08 ` Barry Naujok
2008-08-26 19:32 ` Christoph Hellwig [this message]
2008-08-27 0:33 ` Barry Naujok
2008-08-27 4:21 ` Barry Naujok
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=20080826193205.GA31105@infradead.org \
--to=hch@infradead.org \
--cc=bnaujok@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