Displaying 20 results from an estimated 34 matches for "btrfs_subvolume_get_default".
2014 Dec 11
0
[PATCH v2 02/11] New API: btrfs_subvolume_get_default
btrfs_subvolume_get_default is for getting the default subvolume of
a btrfs filesystem.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
daemon/btrfs.c | 39 +++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 18 ++++++++++++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 58 insertions(+), 1 de...
2014 Nov 21
2
Re: [PATCH 5/6] New API: btrfs_subvolume_get_default
On Friday 21 November 2014 13:17:59 Hu Tao wrote:
> btrfs_subvolume_get_default is for getting the default subvolume of
> a btrfs filesystem.
>
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
> daemon/btrfs.c | 38 ++++++++++++++++++++++++++++++++++++++
> generator/actions.ml | 9 +++++++++
> src/MAX_PROC_NR | 2 +-
> 3 files c...
2014 Nov 21
0
[PATCH 5/6] New API: btrfs_subvolume_get_default
btrfs_subvolume_get_default is for getting the default subvolume of
a btrfs filesystem.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
daemon/btrfs.c | 38 ++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 9 +++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 48 insertions(+), 1 deletion(-)...
2014 Nov 24
0
Re: [PATCH 5/6] New API: btrfs_subvolume_get_default
On Fri, Nov 21, 2014 at 12:11:36PM +0100, Pino Toscano wrote:
> On Friday 21 November 2014 13:17:59 Hu Tao wrote:
> > btrfs_subvolume_get_default is for getting the default subvolume of
> > a btrfs filesystem.
> >
> > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> > ---
> > daemon/btrfs.c | 38 ++++++++++++++++++++++++++++++++++++++
> > generator/actions.ml | 9 +++++++++
> > src/MAX_P...
2014 Dec 02
0
[PATCH 1/8] New API: btrfs_subvolume_get_default
btrfs_subvolume_get_default is for getting the default subvolume of
a btrfs filesystem.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
daemon/btrfs.c | 38 ++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 9 +++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 48 insertions(+), 1 deletion(-)...
2014 Dec 05
2
Re: [PATCH 1/8] New API: btrfs_subvolume_get_default
...gt; index 385b620..80c7ea7 100644
> --- a/generator/actions.ml
> +++ b/generator/actions.ml
> @@ -12027,6 +12027,15 @@ Set readahead (in 512-byte sectors) for the device.
>
> This uses the L<blockdev(8)> command." };
>
> + { defaults with
> + name = "btrfs_subvolume_get_default";
> + style = RInt64 "id", [Pathname "mountpoint"], [];
> + proc_nr = Some 425;
> + optional = Some "btrfs"; camel_name = "BTRFSSubvolumeGetDefault";
> + shortdesc = "get the default subvolume or snapshot of a filesystem"...
2017 Jul 21
0
[PATCH v2 15/23] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...fssubvolume_path);
- free (ret->guestfs_int_btrfssubvolume_list_val);
- }
- free (ret);
-
- return NULL;
-}
-
int
do_btrfs_subvolume_set_default (int64_t id, const char *fs)
{
@@ -649,45 +513,6 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
return 0;
}
-int64_t
-do_btrfs_subvolume_get_default (const mountable_t *fs)
-{
- const size_t MAX_ARGS = 64;
- const char *argv[MAX_ARGS];
- size_t i = 0;
- char *fs_buf = NULL;
- CLEANUP_FREE char *err = NULL;
- CLEANUP_FREE char *out = NULL;
- int r;
- int64_t ret = -1;
-
- fs_buf = mount (fs);
- if (fs_buf == NULL)
- goto error;
-
-...
[PATCH 18/27] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
2017 Jul 14
0
[PATCH 18/27] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...fssubvolume_path);
- free (ret->guestfs_int_btrfssubvolume_list_val);
- }
- free (ret);
-
- return NULL;
-}
-
int
do_btrfs_subvolume_set_default (int64_t id, const char *fs)
{
@@ -649,45 +513,6 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
return 0;
}
-int64_t
-do_btrfs_subvolume_get_default (const mountable_t *fs)
-{
- const size_t MAX_ARGS = 64;
- const char *argv[MAX_ARGS];
- size_t i = 0;
- char *fs_buf = NULL;
- CLEANUP_FREE char *err = NULL;
- CLEANUP_FREE char *out = NULL;
- int r;
- int64_t ret = -1;
-
- fs_buf = mount (fs);
- if (fs_buf == NULL)
- goto error;
-
-...
2014 Nov 26
7
[PATCH v2 0/5] btrfs support part1: subvolume commands
Hi,
This is the part1 of improving btrfs support. This series adds missing
parameters to btrfs_subvolume_snapshot and btrfs_subvolume_create, and
adds two new API btrfs_subvolume_get_default and btrfs_subvolume_show.
Other parts will follow.
Regards,
Hu
changes:
v2:
- add 'once_had_no_optargs = true' for btrfs_subvolume_snapshot and
btrfs_subvolume_create
- improved documents for btrfs_subvolume_snapshot and
btrfs_subvolume_create
- coding style change (patch 5...
2014 Dec 11
14
[PATCH v2 00/11] btrfs support part2: qgroup/quota commands
...s v2 series to add support to btrfs qgroup related commands, inclduing
quota commands, and two leftover of subvolume commands.
Regards,
Hu
changes:
v2:
- add tests for new APIs
- combine btrfs_quota_enable and btrfs_quota_disable
- following APIs changed to operate on Mountable_or_Path:
btrfs_subvolume_get_default, btrfs_quota_enable, btrfs_quota_rescan.
Hu Tao (11):
daemon: btrfs: add helper functions mount and umount
New API: btrfs_subvolume_get_default
New API: btrfs_subvolume_show
New API: btrfs_quota_enable
New API: btrfs_quota_rescan
New API: btrfs_qgroup_limit
New API: btrfs_qgroup_crea...
2018 Apr 09
0
[PATCH 2/3] daemon: use the structs from the Structs module
...2110-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/daemon/inspect_fs_windows.ml b/daemon/inspect_fs_windows.ml
index e9d056cd9..8b2aad8d3 100644
--- a/daemon/inspect_fs_windows.ml
+++ b/daemon/inspect_fs_windows.ml
@@ -372,10 +372,10 @@ and map_registry_disk_blob devices blob =
let offset = int_of_le64 of...
2018 Apr 10
0
[PATCH v2 2/5] daemon: use the structs from the Structs module
...2110-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/daemon/inspect_fs_windows.ml b/daemon/inspect_fs_windows.ml
index e9d056cd9..8b2aad8d3 100644
--- a/daemon/inspect_fs_windows.ml
+++ b/daemon/inspect_fs_windows.ml
@@ -372,10 +372,10 @@ and map_registry_disk_blob devices blob =
let offset = int_of_le64 of...
2014 Nov 21
13
[PATCH 0/6] btrfs support part1: subvolume commands
Hi,
This is the part1 of improving btrfs support. This series adds missing
parameters to btrfs_subvolume_snapshot and btrfs_subvolume_create, and
adds two new API btrfs_subvolume_get_default and btrfs_subvolume_show.
Other parts will follow.
Regards,
Hu
Hu Tao (6):
btrfs: correct words about subvolume and snapshot
btrfs: add optional parameter `ro' to btrfs_subvolume_snapshot
btrfs: add optional parameter `qgroupid' to btrfs_subvolume_snapshot
btrfs: add optional pa...
2014 Dec 12
15
[PATCH v3 00/11] btrfs support part2: qgroup/quota commands
...)
- check the return value of sysroot_path (patch 1)
- check fs_buf rather than fs (patch 1)
- fprintf (stderr,...) -> reply_with_error()
v2:
- add tests for new APIs
- combine btrfs_quota_enable and btrfs_quota_disable
- following APIs changed to operate on Mountable_or_Path:
btrfs_subvolume_get_default, btrfs_quota_enable, btrfs_quota_rescan.
Hu Tao (11):
daemon: btrfs: add helper functions mount and umount
New API: btrfs_subvolume_get_default
New API: btrfs_subvolume_show
New API: btrfs_quota_enable
New API: btrfs_quota_rescan
New API: btrfs_qgroup_limit
New API: btrfs_qgroup_cr...
2014 Nov 26
0
Re: [PATCH v2 0/5] btrfs support part1: subvolume commands
On Wednesday 26 November 2014 17:04:03 Hu Tao wrote:
> This is the part1 of improving btrfs support. This series adds missing
> parameters to btrfs_subvolume_snapshot and btrfs_subvolume_create, and
> adds two new API btrfs_subvolume_get_default and btrfs_subvolume_show.
>
> Other parts will follow.
>
> Regards,
> Hu
>
> changes:
> v2:
> - add 'once_had_no_optargs = true' for btrfs_subvolume_snapshot and
> btrfs_subvolume_create
> - improved documents for btrfs_subvolume_snapshot and
>...
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
2014 Dec 02
21
[PATCH 0/8] btrfs support part2: qgroup commands
Hi,
This series adds support to btrfs qgroup related commands, inclduing
quota commands, and two leftover of subvolume commands.
Regards,
Hu
Hu Tao (8):
New API: btrfs_subvolume_get_default
New API: btrfs_subvolume_show
New API: btrfs_quota_enable
New API: btrfs_quota_disable
New API: btrfs_quota_rescan
New API: btrfs_qgroup_limit
New API: btrfs_qgroup_create
New API: btrfs_qgroup_destroy
daemon/btrfs.c | 412 +++++++++++++++++++++++++++++++++++++++++++++++++++
g...
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 14
0
[PATCH 19/27] daemon: Reimplement ‘list_filesystems’ API in the daemon, in OCaml.
...hen (
+ let vols = Btrfs.btrfs_subvolume_list mountable in
+
+ (* Filter out the default subvolume. 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 }...
2018 Apr 09
0
[PATCH 3/3] daemon: autogenerate most of OCaml interfaces
...* You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *)
-
-val btrfs_subvolume_list : Mountable.t -> Structs.btrfssubvolume list
-val btrfs_subvolume_get_default : Mountable.t -> int64
diff --git a/daemon/devsparts.mli b/daemon/devsparts.mli
deleted file mode 100644
index 7b669c269..000000000
--- a/daemon/devsparts.mli
+++ /dev/null
@@ -1,25 +0,0 @@
-(* guestfs-inspection
- * Copyright (C) 2009-2018 Red Hat Inc.
- *
- * This program is free software; you...