Displaying 20 results from an estimated 30 matches for "do_btrfs_subvolume_cr".
2014 Nov 21
2
Re: [PATCH 4/6] btrfs: add optional parameter `qgroupid' to btrfs_subvolume_create
...2 files changed, 17 insertions(+), 8 deletions(-)
>
> diff --git a/daemon/btrfs.c b/daemon/btrfs.c
> index a20afca..0f525fa 100644
> --- a/daemon/btrfs.c
> +++ b/daemon/btrfs.c
> @@ -291,7 +291,7 @@ do_btrfs_subvolume_delete (const char *subvolume)
> }
>
> int
> -do_btrfs_subvolume_create (const char *dest)
> +do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
> {
> const size_t MAX_ARGS = 64;
> const char *argv[MAX_ARGS];
> @@ -309,6 +309,14 @@ do_btrfs_subvolume_create (const char *dest)
> ADD_ARG (argv, i, str_btrfs);
> ADD_AR...
2014 Nov 24
1
Re: [PATCH 4/6] btrfs: add optional parameter `qgroupid' to btrfs_subvolume_create
...n/btrfs.c b/daemon/btrfs.c
> > > index a20afca..0f525fa 100644
> > > --- a/daemon/btrfs.c
> > > +++ b/daemon/btrfs.c
> > > @@ -291,7 +291,7 @@ do_btrfs_subvolume_delete (const char *subvolume)
> > > }
> > >
> > > int
> > > -do_btrfs_subvolume_create (const char *dest)
> > > +do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
> > > {
> > > const size_t MAX_ARGS = 64;
> > > const char *argv[MAX_ARGS];
> > > @@ -309,6 +309,14 @@ do_btrfs_subvolume_create (const char *dest)
&g...
2014 Nov 21
0
[PATCH 4/6] btrfs: add optional parameter `qgroupid' to btrfs_subvolume_create
...+++++-
generator/actions.ml | 15 ++++++++-------
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index a20afca..0f525fa 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -291,7 +291,7 @@ do_btrfs_subvolume_delete (const char *subvolume)
}
int
-do_btrfs_subvolume_create (const char *dest)
+do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
{
const size_t MAX_ARGS = 64;
const char *argv[MAX_ARGS];
@@ -309,6 +309,14 @@ do_btrfs_subvolume_create (const char *dest)
ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");...
2014 Nov 24
0
Re: [PATCH 4/6] btrfs: add optional parameter `qgroupid' to btrfs_subvolume_create
...> >
> > diff --git a/daemon/btrfs.c b/daemon/btrfs.c
> > index a20afca..0f525fa 100644
> > --- a/daemon/btrfs.c
> > +++ b/daemon/btrfs.c
> > @@ -291,7 +291,7 @@ do_btrfs_subvolume_delete (const char *subvolume)
> > }
> >
> > int
> > -do_btrfs_subvolume_create (const char *dest)
> > +do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
> > {
> > const size_t MAX_ARGS = 64;
> > const char *argv[MAX_ARGS];
> > @@ -309,6 +309,14 @@ do_btrfs_subvolume_create (const char *dest)
> > ADD_ARG (argv,...
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
1
Re: [PATCH v2 01/11] daemon: btrfs: add helper functions mount and umount
...on/btrfs.c | 104 +++++++++++++++++++++++++++++++--------------------------
> 1 file changed, 56 insertions(+), 48 deletions(-)
>
> diff --git a/daemon/btrfs.c b/daemon/btrfs.c
> index 754fdcd..2e9859d 100644
> --- a/daemon/btrfs.c
> +++ b/daemon/btrfs.c
> @@ -326,6 +326,56 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
> return 0;
> }
>
> +static char
> +*mount (const mountable_t *fs)
> +{
> + char *fs_buf = NULL;
You shouldn't initialize fs_buf to NULL here, since it prevents
the compiler from detecting uninitialized use of fs_buf.
Th...
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
0
[PATCH v3 01/11] daemon: btrfs: add helper functions mount and umount
...;hutao@cn.fujitsu.com>
---
daemon/btrfs.c | 106 +++++++++++++++++++++++++++++++--------------------------
1 file changed, 58 insertions(+), 48 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 754fdcd..514ba37 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -326,6 +326,58 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
return 0;
}
+static char
+*mount (const mountable_t *fs)
+{
+ char *fs_buf;
+
+ if (fs->type == MOUNTABLE_PATH) {
+ fs_buf = sysroot_path (fs->device);
+ if (fs_buf == NULL)
+ reply_with_perror ("malloc");
+ } else {
+...
2014 Dec 11
0
[PATCH v2 01/11] daemon: btrfs: add helper functions mount and umount
...;hutao@cn.fujitsu.com>
---
daemon/btrfs.c | 104 +++++++++++++++++++++++++++++++--------------------------
1 file changed, 56 insertions(+), 48 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 754fdcd..2e9859d 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -326,6 +326,56 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
return 0;
}
+static char
+*mount (const mountable_t *fs)
+{
+ char *fs_buf = NULL;
+
+ if (fs->type == MOUNTABLE_PATH) {
+ return sysroot_path (fs->device);
+ } else {
+ fs_buf = strdup ("/tmp/btrfs.XXXXXX");
+ if (fs_bu...
2013 Jan 24
5
[PATCH] btrfs: Fix btrfs_subvolume_list on F18
The output of btrfs subvolume list has changed in F18 to include generation,
which breaks the parsing in btrfs_subvolume_list. This change replaces sscanf
with a more robust regular expression. The new regular expression should also
handle the addition of future unexpected columns.
Fixes RHBZ#903620
---
daemon/Makefile.am | 6 +++--
daemon/btrfs.c | 67
2017 Jul 14
0
[PATCH 09/27] daemon: Reimplement ‘mount’, ‘mount_ro’, ‘mount_options’, ‘mount_vfs’ APIs in OCaml.
...(str_btrfs, btrfs);
GUESTFSD_EXT_CMD(str_btrfstune, btrfstune);
GUESTFSD_EXT_CMD(str_btrfsck, btrfsck);
GUESTFSD_EXT_CMD(str_mkfs_btrfs, mkfs.btrfs);
+GUESTFSD_EXT_CMD(str_mount, mount);
GUESTFSD_EXT_CMD(str_umount, umount);
GUESTFSD_EXT_CMD(str_btrfsimage, btrfs-image);
@@ -387,6 +388,48 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
return 0;
}
+static int
+mount_vfs_nochroot (const char *options, const char *vfstype,
+ const mountable_t *mountable,
+ const char *mp, const char *user_mp)
+{
+ CLEANUP_FREE char *options_plus = NULL;
+ con...
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 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
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot
This is significantly reworked from before. umount is gone as
discussed, and variable motion is minimised.
[PATCH 2/7] btrfs: Update btrfs_subvolume_list to take
Already provisionally ACKed. Previous comment was that cleanup could
be tidier. I looked into creating a new cleanup function for fs_buf,
but it isn't possible (or simple, anyway) in this
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...266,7 @@ do_btrfs_subvolume_delete (const char *subvolume)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "delete");
ADD_ARG (argv, i, subvolume_buf);
@@ -295,7 +300,7 @@ do_btrfs_subvolume_create (const char *dest)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "create");
ADD_ARG (argv, i, dest_buf);
@@ -331,7 +336,7 @@ do_btrfs_subvolume_list (const char *fs)...
2012 Aug 30
1
[PATCH] collect list of called external commands
...266,7 @@ do_btrfs_subvolume_delete (const char *subvolume)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "delete");
ADD_ARG (argv, i, subvolume_buf);
@@ -295,7 +300,7 @@ do_btrfs_subvolume_create (const char *dest)
return -1;
}
- ADD_ARG (argv, i, "btrfs");
+ ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "create");
ADD_ARG (argv, i, dest_buf);
@@ -331,7 +336,7 @@ do_btrfs_subvolume_list (const char *fs)...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...326,7 @@ do_btrfs_subvolume_delete (const char *subvolume)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "delete");
ADD_ARG (argv, i, subvolume_buf);
@@ -364,7 +357,7 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "create");
@@ -426,7 +419,7 @@ umount (char *fs_buf, const mountable_t *fs)...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...329,7 @@ do_btrfs_subvolume_delete (const char *subvolume)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "delete");
ADD_ARG (argv, i, subvolume_buf);
@@ -364,7 +360,7 @@ do_btrfs_subvolume_create (const char *dest, const char *qgroupid)
return -1;
}
- ADD_ARG (argv, i, str_btrfs);
+ ADD_ARG (argv, i, "btrfs");
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "create");
@@ -426,7 +422,7 @@ umount (char *fs_buf, const mountable_t *fs)...
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device.
---
generator/bindtests.ml | 2 +-
generator/c.ml | 7 +++++--
generator/csharp.ml | 6 ++++--
generator/daemon.ml | 4 ++--
generator/erlang.ml | 6 +++---
generator/fish.ml | 8 ++++----
generator/gobject.ml | 11 ++++++-----
generator/haskell.ml | 11 +++++++----
generator/java.ml | 10 +++++-----
2017 Jun 03
12
[PATCH v2 00/12] Allow APIs to be implemented in OCaml.
Version 1 was here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00003.html
This patch series reimplements a few more APIs in OCaml, including
some very important core APIs like ?list_filesystems? and ?mount?.
All the tests pass after this.
The selection of APIs that I have moved may look a little random, but
in fact they are all APIs consumed by the inspection code (and some
more