Whamcloud - gitweb
resize2fs: don't attempt to calculate minimum size on fs with errors
My old patch:
resize2fs: don't print minimum size if fs is not clean
almost did this, but it still calculated the size; it just didn't print
it. Which is a bit silly.
Jes had a pretty badly corrupted image which made the minimum size
calculation go off into the weeds. It was corrupted, and also marked
as having an error.
We'll eventually bail out for an unmounted filesystem if it's marked
as being in an error state anyway; just move that test & bail-out
to a much earlier point, and remove the now-duplicate one under the
print_min_size block.
This will catch & block all resize operations on an offline filesystem
with errors, in one central place.
Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>