mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Add -f option to resize2fs -P in vfs_minimum_size.
Sometimes the user wants to know minimum size for dirty (e.g. mounted) filesystems. In this case, resize2fs -P will require calling e2fsck -f, while "in general, it is not safe to run e2fsck on mounted filesystems". Since resize2fs -P does not modify filesystem, we force it to display (probably approximate) minimum size.
This commit is contained in:
committed by
Richard W.M. Jones
parent
d723b352f8
commit
4a7b32a7e2
@@ -317,7 +317,7 @@ ext_minimum_size (const char *device)
|
||||
long block_size;
|
||||
const char *pattern = "Estimated minimum size of the filesystem: ";
|
||||
|
||||
r = command (&out, &err, str_resize2fs, "-P", device, NULL);
|
||||
r = command (&out, &err, str_resize2fs, "-P", "-f", device, NULL);
|
||||
if (r == -1) {
|
||||
reply_with_error ("%s", err);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user