search for: btrfssubvolume_id

Displaying 20 results from an estimated 30 matches for "btrfssubvolume_id".

2016 Feb 25
5
[PATCH] listfs: ignore the default btrfs subvolume
...t_default (g, device); + for (size_t i = 0; i < vols->len; i++) { struct guestfs_btrfssubvolume *this = &vols->val[i]; + + /* Ignore the default subvolume. We get it by simply mounting + * the whole device of this btrfs filesystem. + */ + if (this->btrfssubvolume_id == (uint64_t) default_volume) + continue; + guestfs_int_add_sprintf (g, sb, "btrfsvol:%s/%s", device, this->btrfssubvolume_path); -- 2.5.0
2018 Apr 09
0
[PATCH 2/3] daemon: use the structs from the Structs module
...5 files changed, 7 insertions(+), 34 deletions(-) diff --git a/daemon/btrfs.mli b/daemon/btrfs.mli index 8ca91fb47..ce1c2b66f 100644 --- a/daemon/btrfs.mli +++ b/daemon/btrfs.mli @@ -16,11 +16,5 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -type btrfssubvolume = { - btrfssubvolume_id : int64; - btrfssubvolume_top_level_id : int64; - btrfssubvolume_path : string; -} - -val btrfs_subvolume_list : Mountable.t -> btrfssubvolume list +val btrfs_subvolume_list : Mountable.t -> Structs.btrfssubvolume list val btrfs_subvolume_get_default : Mountable.t -> int64 diff --git a/...
2018 Apr 10
0
[PATCH v2 2/5] daemon: use the structs from the Structs module
...5 files changed, 7 insertions(+), 34 deletions(-) diff --git a/daemon/btrfs.mli b/daemon/btrfs.mli index 8ca91fb47..ce1c2b66f 100644 --- a/daemon/btrfs.mli +++ b/daemon/btrfs.mli @@ -16,11 +16,5 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -type btrfssubvolume = { - btrfssubvolume_id : int64; - btrfssubvolume_top_level_id : int64; - btrfssubvolume_path : string; -} - -val btrfs_subvolume_list : Mountable.t -> btrfssubvolume list +val btrfs_subvolume_list : Mountable.t -> Structs.btrfssubvolume list val btrfs_subvolume_get_default : Mountable.t -> int64 diff --git a/...
2013 Jan 24
5
[PATCH] btrfs: Fix btrfs_subvolume_list on F18
...* freed by the calling (XDR) code. */ char *line = lines[i]; + #define N_MATCHES 3 + int ovector[N_MATCHES * 3]; - if (sscanf (line, "ID %" SCNu64 " top level %" SCNu64 " path ", - &ret->guestfs_int_btrfssubvolume_list_val[i].btrfssubvolume_id, - &ret->guestfs_int_btrfssubvolume_list_val[i].btrfssubvolume_top_level_id) != 2) { + if (pcre_exec (re, NULL, line, strlen(line), 0, 0, + ovector, N_MATCHES * 3) < 0) + #undef N_MATCHES + { unexpected_output: reply_with_error ("...
2016 Feb 25
1
Re: [PATCH] listfs: ignore the default btrfs subvolume
...i++) { > > struct guestfs_btrfssubvolume *this = &vols->val[i]; > > + > > + /* Ignore the default subvolume. We get it by simply > > mounting > > + * the whole device of this btrfs filesystem. > > + */ > > + if (this->btrfssubvolume_id == (uint64_t) default_volume) > > + continue; > > + > > guestfs_int_add_sprintf (g, sb, > > "btrfsvol:%s/%s", > > device, this->btrfssubvolume_path); > > ACK. > > Was there an RHBZ# for this? Can't see...
2017 Jul 21
0
[PATCH v2 15/23] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...- } - - struct guestfs_int_btrfssubvolume *this = - &ret->guestfs_int_btrfssubvolume_list_val[i]; - -#if __WORDSIZE == 64 -#define XSTRTOU64 xstrtoul -#else -#define XSTRTOU64 xstrtoull -#endif - - if (XSTRTOU64 (line + ovector[2], NULL, 10, - &this->btrfssubvolume_id, NULL) != LONGINT_OK) - goto unexpected_output; - if (XSTRTOU64 (line + ovector[4], NULL, 10, - &this->btrfssubvolume_top_level_id, NULL) != LONGINT_OK) - goto unexpected_output; - -#undef XSTRTOU64 - - this->btrfssubvolume_path = - strndup (line + o...
2017 Jul 14
0
[PATCH 18/27] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...- } - - struct guestfs_int_btrfssubvolume *this = - &ret->guestfs_int_btrfssubvolume_list_val[i]; - -#if __WORDSIZE == 64 -#define XSTRTOU64 xstrtoul -#else -#define XSTRTOU64 xstrtoull -#endif - - if (XSTRTOU64 (line + ovector[2], NULL, 10, - &this->btrfssubvolume_id, NULL) != LONGINT_OK) - goto unexpected_output; - if (XSTRTOU64 (line + ovector[4], NULL, 10, - &this->btrfssubvolume_top_level_id, NULL) != LONGINT_OK) - goto unexpected_output; - -#undef XSTRTOU64 - - this->btrfssubvolume_path = - strndup (line + o...
2016 Feb 25
0
Re: [PATCH] listfs: ignore the default btrfs subvolume
...for (size_t i = 0; i < vols->len; i++) { > struct guestfs_btrfssubvolume *this = &vols->val[i]; > + > + /* Ignore the default subvolume. We get it by simply mounting > + * the whole device of this btrfs filesystem. > + */ > + if (this->btrfssubvolume_id == (uint64_t) default_volume) > + continue; > + > guestfs_int_add_sprintf (g, sb, > "btrfsvol:%s/%s", > device, this->btrfssubvolume_path); ACK. Was there an RHBZ# for this? Can't seem to find it ... Rich. -- Richard Jones, V...
2017 Aug 01
0
[PATCH v2 3/3] daemon: Restore PCRE regular expressions in OCaml code.
...ing (Str.matched_group 2 line) - and path = Str.matched_group 3 line in + if PCRE.matches re_btrfs_subvolume_list line then ( + let id = Int64.of_string (PCRE.sub 1) + and top_level_id = Int64.of_string (PCRE.sub 2) + and path = PCRE.sub 3 in { btrfssubvolume_id = id; diff --git a/daemon/daemon-c.c b/daemon/daemon-c.c index cbb3d8918..3ecaed4ca 100644 --- a/daemon/daemon-c.c +++ b/daemon/daemon-c.c @@ -65,6 +65,12 @@ guestfs_int_daemon_exn_to_reply_with_error (const char *func, value exn) reply_with_error ("%s", String_val (Field (exn, 1)));...
2017 Jul 14
0
[PATCH 19/27] daemon: Reimplement ‘list_filesystems’ API in the daemon, in OCaml.
...olume. You can access that by + * simply mounting the whole device, so we will add the whole + * device at the beginning of the returned list instead. + *) + let default_volume = Btrfs.btrfs_subvolume_get_default mountable in + let vols = + List.filter ( + fun { Btrfs.btrfssubvolume_id = id } -> id <> default_volume + ) vols in + + Some ( + (mountable, vfs_type) (* whole device = default volume *) + :: List.map ( + fun { Btrfs.btrfssubvolume_path = path } -> + let mountable = Mountable.of_btrfsvol device path in + (m...
2018 Apr 09
5
[PATCH 0/3] daemon: generate almost all the API OCaml interfaces
Hi, as a followup for the signature fix for mount_vfs [1], here it is a patch series to generate automatically most of the OCaml interfaces of daemon actions. Only the Lvm and Mount modules are left with hand-written interfaces. [1] https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html Thanks, Pino Toscano (3): daemon: directly use Optgroups daemon: use the structs from the
2015 Jun 23
10
[PATCH 0/7] Better testing of the guestfsd daemon.
Currently we are unable to properly run guestfsd (the daemon) under valgrind. Attempts to run valgrind inside the appliance have not been successful (see patch 1/7). However we desperately need better valgrind coverage of the daemon, particularly because it is doing a lot of complex parsing of program output. This has been a problem for a long time. A better way to attack this problem is to
2015 Jun 25
13
[PATCH v2 0/9] Better testing of the guestfsd daemon.
In v2: - Kernel command line parsing now moved to the appliance. - In the captive daemon test, the daemon cleanly shuts down on exit. - Add another btrfs test. Rich.
2018 Apr 10
9
[PATCH v2 0/5] daemon: generate almall the API OCaml interfaces
Hi, as a followup for the signature fix for mount_vfs [1], here it is a patch series to generate automatically all the OCaml interfaces of daemon actions. [1] https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html Thanks, Pino Toscano (5): daemon: directly use Optgroups daemon: use the structs from the Structs module daemon: move Lvm.lv_canonical to new Lvm_utils module
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html This series now depends on two small patches which I posted separately: https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html v1 -> v2: - Previously changes to generator/daemon.ml were made incrementally through the patch
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html This series gets as far as a working (and faster) reimplementation of ‘guestfs_list_filesystems’. I also have another patch series on top of this one which reimplements the inspection APIs inside the daemon, but that needs a bit more work still, since inspection turns out to be a very large piece of code. Rich.
2012 Oct 30
5
[PATCH v3 0/5] Add symbol versioning.
This is a simpler patch series to add symbol versioning. I have pushed patches 1-3 upstream. Rich.
2020 Sep 07
9
[PATCH v2 0/7] Windows BitLocker support.
Original version linked from here: https://bugzilla.redhat.com/show_bug.cgi?id=1808977#c8 There is no change in the code in this series, but feedback from the original series was we shouldn't lose the error message in patch 7. When I tested this just now in fact we don't lose the error if debugging is enabled, but I have updated the commit message to note what the error message is in the
2020 Mar 30
9
[PATCH 0/7] Support Windows BitLocker (RHBZ#1808977).
These commits, along with the associated changes to common: https://www.redhat.com/archives/libguestfs/2020-March/msg00286.html support the transparent decryption and inspection of Windows guests encrypted with BitLocker encryption. To do the BitLocker decryption requires cryptsetup 2.3.0 (although cryptsetup 2.3 is not required for existing LUKS use). It also requires a new-ish Linux kernel, I
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.