search for: guestfs_int_btrfsqgroup

Displaying 11 results from an estimated 11 matches for "guestfs_int_btrfsqgroup".

2015 Jun 17
1
Re: [PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
...+ * 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 = malloc (sizeof *ret); > if (!ret) { > reply_with_perror ("malloc"); > - goto error; > + return NULL; > } > > ret->guestfs_int_btrfsqgroup_list_len = nr_qgroups; > @@ -1293,38 +1295,32 @@ do_btrfs_qgroup_show...
2015 Jun 23
1
[PATCH] btrfs: remove redundant whitespace
...volume *this = + struct guestfs_int_btrfssubvolume *this = &ret->guestfs_int_btrfssubvolume_list_val[i]; #if __WORDSIZE == 64 @@ -1298,7 +1298,7 @@ do_btrfs_qgroup_show (const char *path) for (i = 0; i < nr_qgroups; ++i) { char *line = lines[i + 2]; - struct guestfs_int_btrfsqgroup *this = + struct guestfs_int_btrfsqgroup *this = &ret->guestfs_int_btrfsqgroup_list_val[i]; uint64_t dummy1, dummy2; char *p; -- 2.1.0
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
2015 Jun 17
0
[PATCH v4 1/3] do_btrfs_qgroup_show: fix a bad return value
...`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 = malloc (sizeof *ret); if (!ret) { reply_with_perror ("malloc"); - goto error; + return NULL; } ret->guestfs_int_btrfsqgroup_list_len = nr_qgroups; @@ -1293,38 +1295,32 @@ do_btrfs_qgroup_show (const char *path) calloc (nr_qgroups, s...
2015 Jun 17
2
[PATCH] btrfs: keep calloc and its error message match
...umes, sizeof (struct guestfs_int_btrfssubvolume)); if (ret->guestfs_int_btrfssubvolume_list_val == NULL) { - reply_with_perror ("malloc"); + reply_with_perror ("calloc"); goto error; } @@ -1292,7 +1292,7 @@ do_btrfs_qgroup_show (const char *path) ret->guestfs_int_btrfsqgroup_list_val = calloc (nr_qgroups, sizeof (struct guestfs_int_btrfsqgroup)); if (ret->guestfs_int_btrfsqgroup_list_val == NULL) { - reply_with_perror ("malloc"); + reply_with_perror ("calloc"); goto error; } -- 2.1.0
2014 Dec 05
0
[PATCH 09/11] New API: btrfs_qgroup_show
...| 2 +- 8 files changed, 114 insertions(+), 1 deletion(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 15e481a..3d7e79c 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1184,3 +1184,91 @@ int do_btrfs_qgroup_destroy (const char *qgroupid, const char *subvolume) return 0; } + +guestfs_int_btrfsqgroup_list *do_btrfs_qgroup_show (const char *path) +{ + const size_t MAX_ARGS = 64; + const char *argv[MAX_ARGS]; + size_t i = 0; + CLEANUP_FREE char *path_buf = NULL; + CLEANUP_FREE char *err = NULL; + CLEANUP_FREE char *out = NULL; + int r; + char **lines; + + path_buf = sysroot_path (path);...
2015 Jun 17
0
Re: [PATCH] btrfs: keep calloc and its error message match
...bvolume)); > if (ret->guestfs_int_btrfssubvolume_list_val == NULL) { > - reply_with_perror ("malloc"); > + reply_with_perror ("calloc"); > goto error; > } > > @@ -1292,7 +1292,7 @@ do_btrfs_qgroup_show (const char *path) > ret->guestfs_int_btrfsqgroup_list_val = > calloc (nr_qgroups, sizeof (struct guestfs_int_btrfsqgroup)); > if (ret->guestfs_int_btrfsqgroup_list_val == NULL) { > - reply_with_perror ("malloc"); > + reply_with_perror ("calloc"); > goto error; > } LGTM, so pushed wit...
2015 Jun 18
2
[PATCH v5 1/2] do_btrfs_qgroup_show: fix a bad return value
...`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 = malloc (sizeof *ret); if (!ret) { reply_with_perror ("malloc"); - goto error; + return NULL; } ret->guestfs_int_btrfsqgroup_list_len = nr_qgroups; @@ -1300,31 +1302,23 @@ do_btrfs_qgroup_show (const char *path) char *line = lines[i...
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
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):