Commit bbdc322f authored by Lukas Czerner's avatar Lukas Czerner Committed by Theodore Ts'o

ext4: try to initialize all groups we can in case of failure on ppc64

Currently on the machines with page size > block size when initializing
block group buddy cache we initialize it for all the block group bitmaps
in the page. However in the case of read error, checksum error, or if
a single bitmap is in any way corrupted we would fail to initialize all
of the bitmaps. This is problematic because we will not have access to
the other allocation groups even though those might be perfectly fine
and usable.

Fix this by reading all the bitmaps instead of error out on the first
problem and simply skip the bitmaps which were either not read properly,
or are not valid.
Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 41e5b7ed
...@@ -882,10 +882,8 @@ static int ext4_mb_init_cache(struct page *page, char *incore) ...@@ -882,10 +882,8 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
/* wait for I/O completion */ /* wait for I/O completion */
for (i = 0, group = first_group; i < groups_per_page; i++, group++) { for (i = 0, group = first_group; i < groups_per_page; i++, group++) {
if (bh[i] && ext4_wait_block_bitmap(sb, group, bh[i])) { if (bh[i] && ext4_wait_block_bitmap(sb, group, bh[i]))
err = -EIO; err = -EIO;
goto out;
}
} }
first_block = page->index * blocks_per_page; first_block = page->index * blocks_per_page;
...@@ -898,6 +896,11 @@ static int ext4_mb_init_cache(struct page *page, char *incore) ...@@ -898,6 +896,11 @@ static int ext4_mb_init_cache(struct page *page, char *incore)
/* skip initialized uptodate buddy */ /* skip initialized uptodate buddy */
continue; continue;
if (!buffer_verified(bh[group - first_group]))
/* Skip faulty bitmaps */
continue;
err = 0;
/* /*
* data carry information regarding this * data carry information regarding this
* particular group in the format specified * particular group in the format specified
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment