[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH] Re: Is zerofree or resize2fs applicable to ext4?

On Wed, Jun 02, 2010 at 08:01:47AM -0400, Yufang Zhang wrote:
> Can I ask if zerofree or resize2fs could also be applicable to ext4?
> Guestfish help of these two commands indicates that they are
> applicable to ext2/3. But ext4 is not covered in the help. However,
> I have tested these two commands in my Fedora 12 laptop, and it
> seems that both commands work well with ext4. So I don't quite
> understand why the help of these two commands only mention
> ext2/3. Is it a supported feature that these two commands work with
> ext4?

resize2fs: Yes, this will work on ext4.  It should say this in the
documentation.  See the attached patch.

zerofree: I'm cautious about claiming this works on ext4.  It may work
in some cases and break in others (for example, if a file uses


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
>From aa82ef769cc2b78d7ab16ad19c7f7b9e2da0156c Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones redhat com>
Date: Wed, 2 Jun 2010 13:27:19 +0100
Subject: [PATCH] resize2fs: Document this command also works with ext4 (thanks Yufang Zhang).

 src/generator.ml |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/generator.ml b/src/generator.ml
index 571ea3a..efc8bfd 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -2641,9 +2641,9 @@ is lost.");
   ("resize2fs", (RErr, [Device "device"]), 106, [],
    [], (* lvresize tests this *)
-   "resize an ext2/ext3 filesystem",
+   "resize an ext2, ext3 or ext4 filesystem",
-This resizes an ext2 or ext3 filesystem to match the size of
+This resizes an ext2, ext3 or ext4 filesystem to match the size of
 the underlying device.
 I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f>
@@ -4708,7 +4708,7 @@ See also C<guestfs_pread>.");
   ("resize2fs_size", (RErr, [Device "device"; Int64 "size"]), 248, [],
-   "resize an ext2/ext3 filesystem (with size)",
+   "resize an ext2, ext3 or ext4 filesystem (with size)",
 This command is the same as C<guestfs_resize2fs> except that it
 allows you to specify the new size (in bytes) explicitly.");

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]