[PATCH] tests: add test case of set-label and vfs-label for btrfs
by Chen Hanxiao
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
generator/actions.ml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/generator/actions.ml b/generator/actions.ml
index fb971d3..d235f1a 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -8591,6 +8591,11 @@ a file in the host and attach it as a device." };
[["part_disk"; "/dev/sda"; "mbr"];
["mkfs"; "ext2"; "/dev/sda1"; ""; "NOARG"; ""; ""; "test-label"];
["vfs_label"; "/dev/sda1"]], "test-label"), [];
+ InitEmpty, IfAvailable "btrfs", TestResultString (
+ [["part_disk"; "/dev/sda"; "mbr"];
+ ["mkfs"; "btrfs"; "/dev/sda1"; ""; "NOARG"; ""; ""; ""];
+ ["set_label"; "/dev/sda1"; "test-label-btrfs"];
+ ["vfs_label"; "/dev/sda1"]], "test-label-btrfs"), [];
];
shortdesc = "get the filesystem label";
longdesc = "\
--
2.1.0
9 years, 8 months
[PATCH v2] btrfs-qgroup-show: add check for "--raw"
by Chen Hanxiao
btrfs-prog commit:
58a39524619f38d193b8adc3d57888ec07b612aa
change the default output to binary prefix,
and introduced a new option '--raw'
to keep the traditional behaviour.
This patch will add a check function to determine
whether to add '--raw' option to 'btrfs show qgroup'.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
daemon/btrfs.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index d4b3207..fabb00b 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -1210,12 +1210,45 @@ do_btrfs_qgroup_destroy (const char *qgroupid, const char *subvolume)
return 0;
}
+/* btrfs qgroup show command change default output to
+ * binary prefix since v3.18.2, such as KiB;
+ * also introduced '--raw' to keep traditional behaviour.
+ * We could check wheter 'btrfs qgroup show' support '--raw'
+ * option by checking the output of
+ * 'btrfs qgroup show' support --help' command.
+ */
+static int
+test_btrfs_qgroup_show_raw_opt (void)
+{
+ static int result = -1;
+ if (result != -1)
+ return result;
+
+ CLEANUP_FREE char *err = NULL;
+ CLEANUP_FREE char *out = NULL;
+
+ int r = commandr (&out, &err, str_btrfs, "qgroup", "show", "--help", NULL);
+
+ if (r == -1) {
+ reply_with_error ("btrfs qgroup show --help: %s", err);
+ return -1;
+ }
+
+ if (strstr (out, "--raw") == NULL)
+ result = 0;
+ else
+ result = 1;
+
+ return result;
+}
+
guestfs_int_btrfsqgroup_list *
do_btrfs_qgroup_show (const char *path)
{
const size_t MAX_ARGS = 64;
const char *argv[MAX_ARGS];
size_t i = 0;
+ int has_raw_opt = test_btrfs_qgroup_show_raw_opt ();
CLEANUP_FREE char *path_buf = NULL;
CLEANUP_FREE char *err = NULL;
CLEANUP_FREE char *out = NULL;
@@ -1231,6 +1264,8 @@ do_btrfs_qgroup_show (const char *path)
ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "qgroup");
ADD_ARG (argv, i, "show");
+ if (has_raw_opt > 0)
+ ADD_ARG (argv, i, "--raw");
ADD_ARG (argv, i, path_buf);
ADD_ARG (argv, i, NULL);
--
2.1.0
9 years, 8 months
[PATCH] guestfs.pod: don't encourage 'make syntax-check'
by Chen Hanxiao
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
src/guestfs.pod | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/guestfs.pod b/src/guestfs.pod
index 377db21..70400a1 100644
--- a/src/guestfs.pod
+++ b/src/guestfs.pod
@@ -4158,10 +4158,6 @@ Runs the regular test suite.
This is implemented using the regular automake C<TESTS> target. See
the automake documentation for details.
-=item C<make syntax-check -j1 -k>
-
-Checks for various syntax and style problems in the code.
-
=item C<make check-valgrind>
Runs a subset of the test suite under valgrind.
--
2.1.0
9 years, 8 months
[PATCH v3] RFE: journal reader in guestfish
by Maros Zatko
There seems to be a minor issue when user wants to run it through pager (more)
and wants cancel it. User will end up with stuck guestfish until journal-view
transfers all journal items.
Output is now configurable, it's the same format as virt-log has, since both
uses same code now.
Maros Zatko (1):
fish: add journal-view command
cat/Makefile.am | 1 +
cat/log.c | 113 +-------------------------------
fish/Makefile.am | 1 +
fish/fish.h | 3 +
fish/journal.c | 178 +++++++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 9 +++
6 files changed, 195 insertions(+), 110 deletions(-)
create mode 100644 fish/journal.c
--
1.9.3
9 years, 8 months
[PATCH v2] customize: add --truncate-recursive option
by Maros Zatko
Allows user to recursively truncate all files in a directory.
Related to RHBZ#119673
Maros Zatko (1):
customize: add --truncate-recursive option
builder/cmdline.ml | 3 ++-
customize/customize_run.ml | 4 ++++
generator/customize.ml | 8 ++++++++
mllib/common_utils.ml | 8 ++++++++
mllib/common_utils.mli | 2 ++
5 files changed, 24 insertions(+), 1 deletion(-)
--
1.9.3
9 years, 8 months
[PATCH v3] virt-copy, virt-tar: show help for -h
by Maros Zatko
Shows manpage for virt-copy-in,out and virt-tar-in,out
when user supplies -h as a parameter instead of listing
unrelated commands with descriptions.
Maros Zatko (1):
virt-copy, virt-tar: show help for -h
fish/virt-copy-in | 9 +++++++++
fish/virt-copy-out | 9 +++++++++
fish/virt-tar-in | 9 +++++++++
fish/virt-tar-out | 9 +++++++++
4 files changed, 36 insertions(+)
--
1.9.3
9 years, 8 months
[PATCH] [RFE] virt-builder should support download resume
by Maros Zatko
This patchset adds support for resuming downloads in virt-builder.
Partially downloaded file is not deleted on exit anymore.
There is a check for partially downloaded image in cache directory
based on its name. When found, download_to crafts appropriate
options to continue its download.
Fixes RHBZ#1198344
*** BLURB HERE ***
Maros Zatko (1):
builder: support for download resume
builder/downloader.ml | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
--
1.9.3
9 years, 9 months
Request for virt-v2v package on centos 7.0
by Sonu Kumar Gupta
Hi,
I have sucessfully setup ovirt 3.5 engine.
I want to convert physical server in to virtual machine.?
please help me out.
--
*Regards,*
*Sonu Gupta*
9 years, 9 months
Re: [Libguestfs] Can't create any KVM template due to the error with libguestfs
by Thirumalai Nambi
On Mar 17, 2015 11:31 PM, "Thirumalai Nambi" <thirumalai.sandy(a)gmail.com>
wrote:
> Sorry Kashyap and Richard, I won't call your techs like this again, I
> think it's due to my language barrier. Lesson learned.
>
> Can you please help me to fix this issue Richard?
>
> Sorry once again.
>
> Thanks
> [Offlist.]
>
> On Tue, Mar 17, 2015 at 06:21:58PM +0530, Thirumalai Nambi wrote:
> > Update me Richie, Meanwhile, I've booted the server in latest kernel, Its
> > still not working for me.
>
> NOTE: Calling community developers as "Richie" (rude) and "Buddy" is
> very bad practise, that'll ensure you'll be ignored!
>
> --
> /kashyap
>
9 years, 9 months