]> www.infradead.org Git - users/hch/xfsprogs.git/commit
repair: handle directory block corruption in phase 6
authorDave Chinner <dchinner@redhat.com>
Tue, 8 Jul 2014 00:36:34 +0000 (10:36 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 8 Jul 2014 00:36:34 +0000 (10:36 +1000)
commit15e3986b8cd68d8d40eb88cdc5795baccc314de1
tree74cc4327c9afab5d35fdc82069d49d72f6c0507c
parent97ada36338a25ca38e22c430e6ffe91e3d76edb6
repair: handle directory block corruption in phase 6

This should only occur in no-modify mode, but when we fail to find
the last extent in a directory btree due to corruption we need to
trash the directory if it's the first data block we find the error
on. That is because there is nothing to recover from the directory,
and if we try to scan it xfs_reapir segv's because nothing has been
read from disk.

Also catch a memory allocation failure in this code, too.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/phase6.c