search for: qgroupid

Displaying 20 results from an estimated 56 matches for "qgroupid".

2014 Nov 21
2
Re: [PATCH 4/6] btrfs: add optional parameter `qgroupid' to btrfs_subvolume_create
On Friday 21 November 2014 13:17:58 Hu Tao wrote: > Parameter `qgroupid' is for adding the created subvolume to a qgroup. > > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> > --- > daemon/btrfs.c | 10 +++++++++- > generator/actions.ml | 15 ++++++++------- > 2 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/dae...
2014 Nov 24
1
Re: [PATCH 4/6] btrfs: add optional parameter `qgroupid' to btrfs_subvolume_create
On Mon, Nov 24, 2014 at 10:26:50AM +0800, Hu Tao wrote: > On Fri, Nov 21, 2014 at 11:46:37AM +0100, Pino Toscano wrote: > > On Friday 21 November 2014 13:17:58 Hu Tao wrote: > > > Parameter `qgroupid' is for adding the created subvolume to a qgroup. > > > > > > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> > > > --- > > > daemon/btrfs.c | 10 +++++++++- > > > generator/actions.ml | 15 ++++++++------- > > > 2 files changed,...
2014 Nov 24
0
Re: [PATCH 4/6] btrfs: add optional parameter `qgroupid' to btrfs_subvolume_create
On Fri, Nov 21, 2014 at 11:46:37AM +0100, Pino Toscano wrote: > On Friday 21 November 2014 13:17:58 Hu Tao wrote: > > Parameter `qgroupid' is for adding the created subvolume to a qgroup. > > > > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> > > --- > > daemon/btrfs.c | 10 +++++++++- > > generator/actions.ml | 15 ++++++++------- > > 2 files changed, 17 insertions(+), 8 deletions(...
2014 Nov 21
0
[PATCH 4/6] btrfs: add optional parameter `qgroupid' to btrfs_subvolume_create
Parameter `qgroupid' is for adding the created subvolume to a qgroup. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> --- daemon/btrfs.c | 10 +++++++++- generator/actions.ml | 15 ++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index a20af...
2014 Nov 21
0
[PATCH 3/6] btrfs: add optional parameter `qgroupid' to btrfs_subvolume_snapshot
Parameter `qgroupid' is for adding the created snapshot to a qgroup. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> --- daemon/btrfs.c | 8 +++++++- generator/actions.ml | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index b630bce..a20afca 100...
2014 Nov 26
7
[PATCH v2 0/5] btrfs support part1: subvolume commands
...btrfs_subvolume_create - improved documents for btrfs_subvolume_snapshot and btrfs_subvolume_create - coding style change (patch 5) - add analyze_line (patch 5) - rebase Hu Tao (5): btrfs: add optional parameter `ro' to btrfs_subvolume_snapshot btrfs: add optional parameter `qgroupid' to btrfs_subvolume_snapshot btrfs: add optional parameter `qgroupid' to btrfs_subvolume_create New API: btrfs_subvolume_get_default New API: btrfs_subvolume_show daemon/btrfs.c | 246 ++++++++++++++++++++++++++++++++++++++++++++++++++- generator/actions.ml | 51 ++++++++---...
2014 Nov 21
13
[PATCH 0/6] btrfs support part1: subvolume commands
...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 parameter `qgroupid' to btrfs_subvolume_create New API: btrfs_subvolume_get_default New API: btrfs_subvolume_show daemon/btrfs.c | 232 ++++++++++++++++++++++++++++++++++++++++++++++++++- generator/actions.ml | 44 +++++++--- s...
2015 Jun 30
1
[PATCH] tests: fix two minor warnings
...n/test-btrfs.pl b/tests/daemon/test-btrfs.pl index 815ab1d..1430231 100755 --- a/tests/daemon/test-btrfs.pl +++ b/tests/daemon/test-btrfs.pl @@ -63,13 +63,13 @@ EOF die unless $r[2]->{btrfssubvolume_path} eq "test3"; # Test btrfs_qgroup_show. - my $output = <<EOF; -qgroupid rfer excl --------- ---- ---- -0/5 4096 4096 + $output = <<EOF; +qgroupid rfer excl +-------- ---- ---- +0/5 4096 4096 EOF set_btrfs_output ($output); - my @r = $g->btrfs_qgroup_show ("/"); + @r = $g->btrfs_qgroup_show ("/"); die unle...
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into
2015 Jun 17
1
Re: [PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
...> path_buf = sysroot_path (path); > if (path_buf == NULL) { > @@ -1275,17 +1275,19 @@ do_btrfs_qgroup_show (const char *path) > if (!lines) > return NULL; > > - /* line 0 and 1 are: > + /* Output of `btrfs qgroup show' is like: > + * > + * qgroupid rfer excl > + * -------- ---- ---- > + * 0/5 9249849344 9249849344 > * > - * qgroupid rfer excl > - * -------- ---- ---- > */ > size_t nr_qgroups = count_strings (lines) - 2; > guestfs_int_btr...
2014 Dec 02
0
[PATCH 7/8] New API: btrfs_qgroup_create
...insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 033d460..dccaf5a 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1120,3 +1120,35 @@ int do_btrfs_qgroup_limit (const char *subvolume, const char *size) return 0; } + +int do_btrfs_qgroup_create (const char *qgroupid, const char *subvolume) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *subvolume_buf = NULL; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + int r; + + subvolume_buf = sysroot_path (subvolume); + if (subvolume_buf ==...
2020 Jul 07
1
Re: [PATCH] python: Add type hints
Notice that I have added the closing bracket and return type hint into the indentation function as a hack to line wrap correctly when the return type hint is causing > 79 chars per line: So that instead of: def btrfs_subvolume_create(self, dest: str, qgroupid: Optional[str] = None) -> None: We correctly get: def btrfs_subvolume_create(self, dest: str, qgroupid: Optional[str] = None) -> None: Since the indent function looks for a comma to wrap - this works nicely. However there is this one case where we use th...
2015 Jun 16
1
[PATCH] btrfs: remove unused 'out' variables
...ADD_ARG (argv, i, subvolume_buf); ADD_ARG (argv, i, NULL); - r = commandv (&out, &err, argv); + r = commandv (NULL, &err, argv); if (r == -1) { reply_with_error ("%s: %s", subvolume, err); return -1; @@ -1153,7 +1150,6 @@ do_btrfs_qgroup_create (const char *qgroupid, const char *subvolume) size_t i = 0; CLEANUP_FREE char *subvolume_buf = NULL; CLEANUP_FREE char *err = NULL; - CLEANUP_FREE char *out = NULL; int r; subvolume_buf = sysroot_path (subvolume); @@ -1169,7 +1165,7 @@ do_btrfs_qgroup_create (const char *qgroupid, const char *subvolume...
2013 Apr 25
10
[PATCH v4 0/3] Btrfs: quota rescan for 3.10
The kernel side for rescan, which is needed if you want to enable qgroup tracking on a non-empty volume. The first patch splits btrfs_qgroup_account_ref into readable ans reusable units. The second patch adds the rescan implementation (refer to its commit message for a description of the algorithm). The third patch starts an automatic rescan when qgroups are enabled. It is only separated to
2015 Jun 17
6
[PATCH v4 0/3] btrfs: use CLEANUP_FREE_STRING_LIST for list free
As Pino's comment, we should take advantage of macro CLEANUP_FREE_STRING_LIST v4: remove some redundant strdup v3: fix test case failure v2: properly initialize lines Chen Hanxiao (3): do_btrfs_qgroup_show: fix a bad return value do_btrfs_subvolume_list: fix a bad return value btrfs: use CLEANUP_FREE_STRING_LIST for list free daemon/btrfs.c | 70
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):
2015 Mar 16
2
[PATCH] btrfs-qgroup-show: add check for "--raw"
...nhanxiao@cn.fujitsu.com> --- daemon/btrfs.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index d4b3207..ddaf15b 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1210,12 +1210,43 @@ do_btrfs_qgroup_destroy (const char *qgroupid, const char *subvolume) return 0; } +/* btrfs qgroup show command change default output to + * binary prefix since v3.18.2, such as KiB; + * also introduced '--raw' to keep traditional behaviour. + * We could check wheter 'btrfs qgroup show' support '--raw' + * option...
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:
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
2015 Jun 17
0
[PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
...; + CLEANUP_FREE_STRING_LIST char **lines = NULL; path_buf = sysroot_path (path); if (path_buf == NULL) { @@ -1275,17 +1275,19 @@ do_btrfs_qgroup_show (const char *path) if (!lines) return NULL; - /* line 0 and 1 are: + /* Output of `btrfs qgroup show' is like: + * + * qgroupid rfer excl + * -------- ---- ---- + * 0/5 9249849344 9249849344 * - * qgroupid rfer excl - * -------- ---- ---- */ size_t nr_qgroups = count_strings (lines) - 2; guestfs_int_btrfsqgroup_list *ret = NULL; ret = mall...