[PATCH v2 0/4] btrfs: add support to btrfs inspect-internal
by Chen Hanxiao
This series adds new APIs to support btrfs inspect-internal.
v2:
- use full name of btrfs command as inspect-internal
Hu Tao (4):
New API: btrfs_inspect_internal_rootid
New API: btrfs_inspect_internal_subvolid_resolve
New API: btrfs_inspect_internal_inode_resolve
New API: btrfs_inspect_internal_logical_resolve
daemon/btrfs.c | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 56 ++++++++++++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 218 insertions(+), 1 deletion(-)
--
2.1.0
9 years, 9 months
[PATCH 1/2] mllib: add helper mkdir_p
by Pino Toscano
Small function to create in OCaml-based code a directory and its
parents, much like `mkdir -p`.
---
mllib/common_utils.ml | 11 +++++++++++
mllib/common_utils.mli | 3 +++
2 files changed, 14 insertions(+)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 898be17..76d8b79 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -673,3 +673,14 @@ let qemu_input_filename filename =
"./" ^ filename
else
filename
+
+let rec mkdir_p path permissions =
+ try Unix.mkdir path permissions
+ with
+ | Unix.Unix_error (Unix.EEXIST, _, _) -> ()
+ | Unix.Unix_error (Unix.ENOENT, _, _) ->
+ (* A component in the path does not exist, so first try
+ * creating the parent directory, and then again the requested
+ * directory. *)
+ mkdir_p (Filename.dirname path) permissions;
+ Unix.mkdir path permissions
diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli
index 5d3149a..28ba648 100644
--- a/mllib/common_utils.mli
+++ b/mllib/common_utils.mli
@@ -147,3 +147,6 @@ val qemu_input_filename : string -> string
try to interpret that as "foo" in the file:/// protocol. To
avoid that, if the path is relative prefix it with "./" since
qemu-img won't try to interpret such a path. *)
+
+val mkdir_p : string -> int -> unit
+(** Creates a directory, and its parents if missing. *)
--
2.1.0
9 years, 9 months
[PATCH] RFE: journal reader in guestfish
by Maros Zatko
This implements new guestfish only command called journal-view.
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 not yet configurable, it's the same format as virt-log has.
Maros Zatko (1):
fish: add journal-view command
fish/Makefile.am | 1 +
fish/journal.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 9 ++++
3 files changed, 138 insertions(+)
create mode 100644 fish/journal.c
--
1.9.3
9 years, 9 months
Mounting disk images with ext2 filesystems on RHEL7
by Leonard Basuino
Hope someone can point me in the right direction. I don't know if what I
am trying to do should work or not.
I have 2 disk images. One is a VM with an ext2 boot filesystem and ext4
filesystems with the OS loaded. I am amble to guestmount this with no
issue and am able to see the files that are on the ext2 file system.
I can also run guestfish on the image, mount the ext2 filesystem, and list
the files.
However, the second image I have is only a boot disk image with just an
ext2 filesystem.
guestmount complains that there is no OS and won't mount.
guestfish complains "...wrong fs type, bad option, bad superblock...".
Should I be able to mount a boot disk image with guestmount?
I suspect I'll have to use the -m (mount) option and not -i (as I did for
the image with an OS), but that failed too even though I passed in the fs
type of ext2,
Why would I be able to mount, via guestfish, the ext2 in the first image
(with other filesystems of type ext4) but not the disk image with only an
ext2 filesystem?
TIA!
Lenny B.
9 years, 9 months
[PATCH] Fix a bug in e2fsck execution code
by Nikos Skalkotos
Use commandrvf() instead of commandvf() to execute e2fsck. A non-zero
exit status does not always indicate a failure.
Signed-off-by: Nikos Skalkotos <skalkoto(a)grnet.gr>
---
daemon/ext2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/daemon/ext2.c b/daemon/ext2.c
index 65ddae6..8ef6d5f 100644
--- a/daemon/ext2.c
+++ b/daemon/ext2.c
@@ -296,9 +296,9 @@ do_e2fsck (const char *device,
ADD_ARG (argv, i, device);
ADD_ARG (argv, i, NULL);
- r = commandvf (NULL, &err,
- COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
- argv);
+ r = commandrvf (NULL, &err,
+ COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
+ argv);
/* 0 = no errors, 1 = errors corrected.
*
* >= 4 means uncorrected or other errors.
--
1.9.1
9 years, 9 months
ANNOUNCE: libguestfs & hivex translation memory moving to Zanata
by Richard W.M. Jones
Previously we used Transifex, but we're moving the translation memory
to Zanata instead. The reason for this is that we relied on the
Fedora project translators to do almost all of the localization work,
and they have expressed a preference for Zanata over Transifex.
(https://fedoraproject.org/wiki/L10N_Move_To_Zanata)
For packagers and end users of libguestfs, this will have no effect at
all, since we will continue to ship the PO files in the source. No
change there.
If you need to push or pull translations, then the 'tx' commands
detailed in the manual will no longer work. I'm going to work out the
details and post a patch to update the manual.
If you want to contribute translations, you'll obviously have to go
through Zanata (https://fedora.zanata.org) instead of Transifex.
As an additional tip for developers: There is a Zanata python client
which is considerably less heavyweight than the official (Java/JBoss)
Zanata client.
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
9 years, 9 months
[RFC] expand options of btrfs-set-seeding
by Chen, Hanxiao
Hi Rich,
Currently we had btrfs-set-seeding for btrfstune.
But btrfstune had more options:
usage: btrfstune [options] device
-S value positive value will enable seeding, zero to disable, negative is not allowed
-r enable extended inode refs
-x enable skinny metadata extent refs
-f force to clear flags, make sure that you are aware of the dangers
If I want to add more options for btrfstune:
1) expand current btrfs-set-seeding command
2) add new btrfs-tune-XXX which cover current btrfs-set-seeding
3) add new btrfs-tune-XXX as supplyments for btrfs-set-seeding
Which style do you prefer?
Regards,
- Chen
9 years, 9 months
[PATCH] builder: when not checking sigs, ignore --fingerprint args (RHBZ#1193237)
by Pino Toscano
When the user chooses to not verify the signatures on the indexes
(using --no-check-signature), there is no point in requiring as many
--fingerprint as --source (or even just one), as they will not be used
anyway.
In this case just ignore all the values of the specified --fingerprint
arguments.
---
builder/cmdline.ml | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index 9dad141..b8227cc 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -281,13 +281,18 @@ read the man page virt-builder(1).
let nr_sources = List.length sources in
let fingerprints =
- match fingerprints with
- | [fingerprint] ->
- (* You're allowed to have multiple sources and one fingerprint: it
- * means that the same fingerprint is used for all sources.
- *)
- repeat fingerprint nr_sources
- | xs -> xs in
+ if check_signature then (
+ match fingerprints with
+ | [fingerprint] ->
+ (* You're allowed to have multiple sources and one fingerprint: it
+ * means that the same fingerprint is used for all sources.
+ *)
+ repeat fingerprint nr_sources
+ | xs -> xs
+ ) else
+ (* We are not checking signatures, so just ignore any fingerprint
+ * specified. *)
+ repeat "" nr_sources in
if List.length fingerprints <> nr_sources then
error (f_"source and fingerprint lists are not the same length");
--
2.1.4
9 years, 9 months
[PATCH] builder: process --source sources before
by Pino Toscano
Process the sources specified via the --source command line arguments
before sources read from repositories, so the former have a chance to
"override" the latter.
Related to RHBZ#1193238.
---
builder/builder.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/builder.ml b/builder/builder.ml
index c7f1dae..a519913 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -158,7 +158,7 @@ let main () =
proxy = Downloader.SystemProxy;
}
) sources in
- let sources = List.append repos sources in
+ let sources = List.append sources repos in
let index : Index_parser.index =
List.concat (
List.map (
--
2.1.4
9 years, 9 months
[PATCH v5 0/2] add btrfs_balance_status and btrfs_scrub_status
by Chen Hanxiao
v5:
- fix tests failure
v4:
- add reply_with_error when nlines < 1
- remove `i == X' tests.
v3:
- rebase on upstream
- fix some comments
v2:
- add check for the length of lines[]
- the code parsing 'btrfs scrub -R status' output is changed into a loop
Hu Tao (2):
New API: btrfs_balance_status
New API: btfs_scrub_status
daemon/btrfs.c | 270 +++++++++++++++++++++++++++++++
generator/actions.ml | 26 +++
generator/structs.ml | 34 ++++
gobject/Makefile.inc | 4 +
java/Makefile.inc | 2 +
java/com/redhat/et/libguestfs/.gitignore | 2 +
po/POTFILES | 2 +
src/MAX_PROC_NR | 2 +-
8 files changed, 341 insertions(+), 1 deletion(-)
--
2.1.0
9 years, 9 months