Skip to content

Commit

Permalink
resize2fs: don't exit if shrinking sparse_super2 fs to one bg
Browse files Browse the repository at this point in the history
If we're shrinking a sparse_super2 filesystem to a single block group,
the superblock will be in block 0.  This is perfectly valid (for block
group 0 with a blocksize > 1024) so don't exit.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
djwong authored and tytso committed Dec 14, 2014
1 parent 5effd0a commit 4495c5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resize/resize2fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2126,7 +2126,7 @@ static errcode_t reserve_sparse_super2_last_group(ext2_resize_t rfs,
if (retval)
return retval;

if (!sb) {
if (last_bg && !sb) {
fputs(_("Should never happen! No sb in last super_sparse bg?\n"),
stderr);
exit(1);
Expand Down

0 comments on commit 4495c5a

Please sign in to comment.