Whamcloud - gitweb
resize2fs: don't fail when shrinking an empty file system
authorTheodore Ts'o <tytso@mit.edu>
Sun, 16 Oct 2011 23:29:40 +0000 (19:29 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 16 Oct 2011 23:29:40 +0000 (19:29 -0400)
commit515e555a0c36ae0294d71ba9ba45f7fa576cfd0f
treed99e49974a317686b34bfb883a272c08a18db825
parentcacad7d641ef821ca7983d9dc0304baa9beaf3de
resize2fs: don't fail when shrinking an empty file system

This commit fixes a failure when running the commands:

dd if=/dev/zero of=fs bs=1k count=100k; mke2fs fs; resize2fs -Mp fs

We should not try truncating the file system if there is only a single
block group in the file system.

Addresses-Sourceforge-Bug: #3404051

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
resize/resize2fs.c