Pino Toscano
2016-Jul-19 16:48 UTC
[Libguestfs] [PATCH 0/2] Small improvements to f2fs support
Hi, easy series to improve the support for f2fs filesystems: while we should be able to mount them already (if the used kernel has the support for this filesystem), put in the appliance f2fs-tools, so we can also create them. Unfortunately, there isn't much in f2fs-tools, so all that can be done is simply setting a different label only when creating a filesystem. Thanks, Pino Toscano (2): appliance: add f2fs-tools to the appliance daemon: mkfs: allow setting labels for f2fs filesystems appliance/packagelist.in | 1 + daemon/mkfs.c | 4 ++++ 2 files changed, 5 insertions(+) -- 2.7.4
Pino Toscano
2016-Jul-19 16:48 UTC
[Libguestfs] [PATCH 1/2] appliance: add f2fs-tools to the appliance
Helper tools for f2fs filesystems. --- appliance/packagelist.in | 1 + 1 file changed, 1 insertion(+) diff --git a/appliance/packagelist.in b/appliance/packagelist.in index 3a4790b..d2a065f 100644 --- a/appliance/packagelist.in +++ b/appliance/packagelist.in @@ -221,6 +221,7 @@ cpio diffutils dosfstools e2fsprogs +f2fs-tools file findutils gawk -- 2.7.4
Pino Toscano
2016-Jul-19 16:48 UTC
[Libguestfs] [PATCH 2/2] daemon: mkfs: allow setting labels for f2fs filesystems
Pass -L $LABEL to set the label of a f2fs filesystem when creating it. --- daemon/mkfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon/mkfs.c b/daemon/mkfs.c index cef3574..a0617a0 100644 --- a/daemon/mkfs.c +++ b/daemon/mkfs.c @@ -228,6 +228,10 @@ do_mkfs (const char *fstype, const char *device, int blocksize, ADD_ARG (argv, i, "-L"); ADD_ARG (argv, i, label); } + else if (STREQ (fstype, "f2fs")) { + ADD_ARG (argv, i, "-l"); + ADD_ARG (argv, i, label); + } else { reply_with_error ("don't know how to set the label for '%s' filesystems", fstype); -- 2.7.4
Richard W.M. Jones
2016-Jul-19 20:48 UTC
Re: [Libguestfs] [PATCH 2/2] daemon: mkfs: allow setting labels for f2fs filesystems
On Tue, Jul 19, 2016 at 06:48:49PM +0200, Pino Toscano wrote:> Pass -L $LABEL to set the label of a f2fs filesystem when creating it. > --- > daemon/mkfs.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/daemon/mkfs.c b/daemon/mkfs.c > index cef3574..a0617a0 100644 > --- a/daemon/mkfs.c > +++ b/daemon/mkfs.c > @@ -228,6 +228,10 @@ do_mkfs (const char *fstype, const char *device, int blocksize, > ADD_ARG (argv, i, "-L"); > ADD_ARG (argv, i, label); > } > + else if (STREQ (fstype, "f2fs")) { > + ADD_ARG (argv, i, "-l"); > + ADD_ARG (argv, i, label); > + } > else { > reply_with_error ("don't know how to set the label for '%s' filesystems", > fstype);ACK series. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Possibly Parallel Threads
- [PATCH 0/2] Small improvements to f2fs support
- [PATCH] daemon: mkfs: Use -I option to force mkfs.fat to write a filesystem over a whole device (RHBZ#1039995).
- [PATCH] mkfs: add 'label' optional argument
- [PATCH] daemon: add a space after func/macro to fit code-style
- [PATCH] mkfs: optimization and code cleanup