Displaying 20 results from an estimated 26 matches for "do_btrfs_subvolume_set_default".
2014 Nov 21
2
Re: [PATCH 5/6] New API: btrfs_subvolume_get_default
...gt; generator/actions.ml | 9 +++++++++
> src/MAX_PROC_NR | 2 +-
> 3 files changed, 48 insertions(+), 1 deletion(-)
>
> diff --git a/daemon/btrfs.c b/daemon/btrfs.c
> index 0f525fa..e179b57 100644
> --- a/daemon/btrfs.c
> +++ b/daemon/btrfs.c
> @@ -549,6 +549,44 @@ do_btrfs_subvolume_set_default (int64_t id, const
char *fs)
> }
>
> int
> +do_btrfs_subvolume_get_default (const char *fs)
> +{
> + const size_t MAX_ARGS = 64;
> + const char *argv[MAX_ARGS];
> + size_t i = 0;
> + CLEANUP_FREE char *fs_buf = NULL;
> + CLEANUP_FREE char *err = NULL;
> +...
2017 Jul 21
0
[PATCH v2 15/23] daemon: Reimplement ‘btrfs_subvolume_list’ and ‘btrfs_subvolume_get_default’ in OCaml.
...t;
-
- error:
- if (ret->guestfs_int_btrfssubvolume_list_val) {
- for (i = 0; i < nr_subvolumes; ++i)
- free (ret->guestfs_int_btrfssubvolume_list_val[i].btrfssubvolume_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 = NUL...
[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.
...t;
-
- error:
- if (ret->guestfs_int_btrfssubvolume_list_val) {
- for (i = 0; i < nr_subvolumes; ++i)
- free (ret->guestfs_int_btrfssubvolume_list_val[i].btrfssubvolume_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 = NUL...
2014 Nov 21
0
[PATCH 5/6] New API: btrfs_subvolume_get_default
...| 38 ++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 9 +++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 0f525fa..e179b57 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -549,6 +549,44 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
}
int
+do_btrfs_subvolume_get_default (const char *fs)
+{
+ const size_t MAX_ARGS = 64;
+ const char *argv[MAX_ARGS];
+ size_t i = 0;
+ CLEANUP_FREE char *fs_buf = NULL;
+ CLEANUP_FREE char *err = NULL;
+ CLEANUP_FREE char *out = NULL;
+ int r;
+
+ fs_buf =...
2014 Nov 24
0
Re: [PATCH 5/6] New API: btrfs_subvolume_get_default
...> > src/MAX_PROC_NR | 2 +-
> > 3 files changed, 48 insertions(+), 1 deletion(-)
> >
> > diff --git a/daemon/btrfs.c b/daemon/btrfs.c
> > index 0f525fa..e179b57 100644
> > --- a/daemon/btrfs.c
> > +++ b/daemon/btrfs.c
> > @@ -549,6 +549,44 @@ do_btrfs_subvolume_set_default (int64_t id, const
> char *fs)
> > }
> >
> > int
> > +do_btrfs_subvolume_get_default (const char *fs)
> > +{
> > + const size_t MAX_ARGS = 64;
> > + const char *argv[MAX_ARGS];
> > + size_t i = 0;
> > + CLEANUP_FREE char *fs_buf = NU...
2014 Dec 02
0
[PATCH 1/8] New API: btrfs_subvolume_get_default
...| 38 ++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 9 +++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 754fdcd..471cfbd 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -545,6 +545,44 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
return 0;
}
+int64_t
+do_btrfs_subvolume_get_default (const char *mountpoint)
+{
+ const size_t MAX_ARGS = 64;
+ const char *argv[MAX_ARGS];
+ size_t i = 0;
+ CLEANUP_FREE char *fs_buf = NULL;
+ CLEANUP_FREE char *err = NULL;
+ CLEANUP_FREE char *out = NULL;...
2014 Dec 11
0
[PATCH v2 02/11] New API: btrfs_subvolume_get_default
...++++++++++++++++++++++++++++++++++
generator/actions.ml | 18 ++++++++++++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 2e9859d..9f4c5f4 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -553,6 +553,45 @@ 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;
+...
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:
2014 Dec 11
14
[PATCH v2 00/11] btrfs support part2: qgroup/quota commands
Hi,
This is 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):
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
2014 Dec 12
15
[PATCH v3 00/11] btrfs support part2: qgroup/quota commands
Hi,
This is v3 series to add support to btrfs qgroup related commands, inclduing
quota commands, and two leftover of subvolume commands.
Regards,
Hu
changes:
v3:
- don't intialize fs_buf (patch 1)
- 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
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:
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...uf);
@@ -331,7 +336,7 @@ do_btrfs_subvolume_list (const char *fs)
return NULL;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "list");
ADD_ARG (argv, i, fs_buf);
@@ -428,7 +433,7 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "set-default");
ADD_ARG (argv, i, buf);
@@ -463,7 +468,7 @@ do_btrfs_filesystem_sync (const ch...
2012 Aug 30
1
[PATCH] collect list of called external commands
...uf);
@@ -331,7 +336,7 @@ do_btrfs_subvolume_list (const char *fs)
return NULL;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "list");
ADD_ARG (argv, i, fs_buf);
@@ -428,7 +433,7 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "set-default");
ADD_ARG (argv, i, buf);
@@ -463,7 +468,7 @@ do_btrfs_filesystem_sync (const ch...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...s_subvolume_list (const mountable_t *fs)
if (!fs_buf)
return NULL;
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "list");
ADD_ARG (argv, i, fs_buf);
@@ -590,7 +583,7 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "set-default");
ADD_ARG (argv, i, buf);
@@ -622,7 +615,7 @@ do_btrfs_subvolume_get_default (co...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...s_subvolume_list (const mountable_t *fs)
if (!fs_buf)
return NULL;
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "list");
ADD_ARG (argv, i, fs_buf);
@@ -590,7 +586,7 @@ do_btrfs_subvolume_set_default (int64_t id, const char *fs)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "set-default");
ADD_ARG (argv, i, buf);
@@ -622,7 +618,7 @@ do_btrfs_subvolume_get_default (co...
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.
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.
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 Jul 14
45
[PATCH 00/27] Reimplement many daemon APIs in OCaml.
Previously posted as part of the mega utilities/inspection
series here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00232.html
What I've done is to extract just the parts related to rewriting
daemon APIs in OCaml, rebase them on top of the current master, fix a
few things, and recompile and test everything.
Rich.