search for: str_btrfstune

Displaying 20 results from an estimated 64 matches for "str_btrfstune".

2015 Jun 23
2
[PATCH] uuid: add support to change uuid of btrfs partition
...2 deletions(-) diff --git a/daemon/uuids.c b/daemon/uuids.c index 06b33e9..c18cb55 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -30,6 +30,7 @@ GUESTFSD_EXT_CMD(str_tune2fs, tune2fs); GUESTFSD_EXT_CMD(str_xfs_admin, xfs_admin); GUESTFSD_EXT_CMD(str_swaplabel, swaplabel); +GUESTFSD_EXT_CMD(str_btrfstune, btrfstune); static int e2uuid (const char *device, const char *uuid) @@ -91,6 +92,21 @@ swapuuid (const char *device, const char *uuid) return 0; } +static int +btrfsuuid (const char *device, const char *uuid) +{ + int r; + CLEANUP_FREE char *err = NULL; + + r = command (NULL, &er...
2015 Feb 21
7
[PATCH 0/4] btrfs: add support to btrfstune
This series adds new APIs to support btrfstune. Chen Hanxiao (4): New API: btrfstune_S_enable New API: btrfstune_S_disable New API: btrfstune_r New API: btrfstune_x daemon/btrfs.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/actions.ml | 64 +++++++++++++++++++++++++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 164 insertions(+), 1 deletion(-) --
2015 Jul 13
1
[PATCH] daemon: add a space after func name to fit code-style
...st char *uuid) int has_uuid_opts = test_btrfstune_uuid_opt (); if (has_uuid_opts <= 0) - NOT_SUPPORTED(-1, "btrfs filesystems' UUID cannot be changed"); + NOT_SUPPORTED (-1, "btrfs filesystems' UUID cannot be changed"); r = commandr (NULL, &err, str_btrfstune, "-f", "-U", uuid, device, NULL); @@ -893,10 +893,10 @@ btrfs_set_uuid_random (const char *device) { CLEANUP_FREE char *err = NULL; int r; - int has_uuid_opts = test_btrfstune_uuid_opt(); + int has_uuid_opts = test_btrfstune_uuid_opt (); if (has_uuid_opts <= 0...
2015 Jun 24
2
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...he output of > + * 'btrfstune' command. > + */ > +static int > +test_btrftune_uuid_opt (void) > +{ > + static int result = -1; > + if (result != -1) > + return result; > + > + CLEANUP_FREE char *err = NULL; > + > + int r = commandr (NULL, &err, str_btrfstune, NULL); > + > + if (r == -1) { > + reply_with_error ("btrfstune: %s", err); > + return -1; > + } > + > + /* FIXME currently btrfstune do not support '--help'. > + * If got an invalid options, it will print its usage > + * in stderr. > +...
2015 Mar 01
5
[PATCH v2 0/3] btrfs: add support to btrfstune
This series adds new APIs to support btrfstune. v2: - merge btrfstune_S_[enable|disable] together - fix naming issue Chen Hanxiao (3): New API: btrfstune_seeding New API: btrfstune_enable_extended_inode_refs New API: btrfstune_enable_skinny_metadata_extent_refs daemon/btrfs.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++ generator/actions.ml | 47
2015 Jun 26
3
Re: [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...e output of > + * 'btrfstune' command. > + */ > +static int > +test_btrfstune_uuid_opt (void) > +{ > + static int result = -1; > + if (result != -1) > + return result; > + > + CLEANUP_FREE char *err = NULL; > + > + int r = commandr (NULL, &err, str_btrfstune, NULL); > + > + if (r == -1) { > + reply_with_error ("btrfstune: %s", err); > + return -1; > + } > + > + /* FIXME currently btrfstune do not support '--help'. So --help should be passed anyway to the btrfstune invocation, so with newer versions hopef...
2015 Jun 23
0
Re: [PATCH] uuid: add support to change uuid of btrfs partition
...s.c b/daemon/uuids.c > index 06b33e9..c18cb55 100644 > --- a/daemon/uuids.c > +++ b/daemon/uuids.c > @@ -30,6 +30,7 @@ > GUESTFSD_EXT_CMD(str_tune2fs, tune2fs); > GUESTFSD_EXT_CMD(str_xfs_admin, xfs_admin); > GUESTFSD_EXT_CMD(str_swaplabel, swaplabel); > +GUESTFSD_EXT_CMD(str_btrfstune, btrfstune); > > static int > e2uuid (const char *device, const char *uuid) > @@ -91,6 +92,21 @@ swapuuid (const char *device, const char *uuid) > return 0; > } > > +static int > +btrfsuuid (const char *device, const char *uuid) > +{ > + int r; > + CL...
2015 Feb 27
1
Re: [PATCH 4/4] New API: btrfstune_x
...n 0; > } > + > +int > +do_btrfstune_x (const char *device) > +{ > + const size_t MAX_ARGS = 64; > + const char *argv[MAX_ARGS]; > + size_t i = 0; > + CLEANUP_FREE char *err = NULL; > + CLEANUP_FREE char *out = NULL; > + int r; > + > + ADD_ARG (argv, i, str_btrfstune); > + ADD_ARG (argv, i, "-x"); > + ADD_ARG (argv, i, device); > + ADD_ARG (argv, i, NULL); > + > + r = commandv (&out, &err, argv); > + if (r == -1) { > + reply_with_error ("%s: %s", device, err); > + return -1; > + } > + > +...
2015 Jun 24
10
[PATCH 0/5] uuid: add btrfs uuid change support and some rework
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - uuids.c did a lot of deplicated work for changing uuid of fs. Use existed functions. -- Introduce new API: btrfstune_set_uuid_random Chen Hanxiao (5): uuid: add support to change uuid of btrfs partition uuid: use existed function of ext2 uuid: use newly introduced
2015 Jun 24
0
[PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...+ * '-u' and '-U UUID' option by checking the output of + * 'btrfstune' command. + */ +static int +test_btrftune_uuid_opt (void) +{ + static int result = -1; + if (result != -1) + return result; + + CLEANUP_FREE char *err = NULL; + + int r = commandr (NULL, &err, str_btrfstune, NULL); + + if (r == -1) { + reply_with_error ("btrfstune: %s", err); + return -1; + } + + /* FIXME currently btrfstune do not support '--help'. + * If got an invalid options, it will print its usage + * in stderr. + * We had to check it there. + */ + if (strstr...
2015 Jun 26
0
[PATCH v3 1/4] uuid: add support to change uuid of btrfs partition
...+ * '-u' and '-U UUID' option by checking the output of + * 'btrfstune' command. + */ +static int +test_btrftune_uuid_opt (void) +{ + static int result = -1; + if (result != -1) + return result; + + CLEANUP_FREE char *err = NULL; + + int r = commandr (NULL, &err, str_btrfstune, NULL); + + if (r == -1) { + reply_with_error ("btrfstune: %s", err); + return -1; + } + + /* FIXME currently btrfstune do not support '--help'. + * If got an invalid options, it will print its usage + * in stderr. + * We had to check it there. + */ + if (strstr...
2015 Jun 26
0
[PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...+ * '-u' and '-U UUID' option by checking the output of + * 'btrfstune' command. + */ +static int +test_btrfstune_uuid_opt (void) +{ + static int result = -1; + if (result != -1) + return result; + + CLEANUP_FREE char *err = NULL; + + int r = commandr (NULL, &err, str_btrfstune, NULL); + + if (r == -1) { + reply_with_error ("btrfstune: %s", err); + return -1; + } + + /* FIXME currently btrfstune do not support '--help'. + * If got an invalid options, it will print its usage + * in stderr. + * We had to check it there. + */ + if (strstr...
2015 Feb 27
1
Re: [PATCH 3/4] New API: btrfstune_r
...n 0; > } > + > +int > +do_btrfstune_r (const char *device) > +{ > + const size_t MAX_ARGS = 64; > + const char *argv[MAX_ARGS]; > + size_t i = 0; > + CLEANUP_FREE char *err = NULL; > + CLEANUP_FREE char *out = NULL; > + int r; > + > + ADD_ARG (argv, i, str_btrfstune); > + ADD_ARG (argv, i, "-r"); > + ADD_ARG (argv, i, device); > + ADD_ARG (argv, i, NULL); > + > + r = commandv (&out, &err, argv); > + if (r == -1) { > + reply_with_error ("%s: %s", device, err); > + return -1; > + } > + > +...
2015 Jun 30
0
[PATCH v4 1/7] uuid: add support to change uuid of btrfs partition
...+ * '-u' and '-U UUID' option by checking the output of + * 'btrfstune' command. + */ +static int +test_btrfstune_uuid_opt (void) +{ + static int result = -1; + if (result != -1) + return result; + + CLEANUP_FREE char *err = NULL; + + int r = commandr (NULL, &err, str_btrfstune, "--help", NULL); + + if (r == -1) { + reply_with_error ("btrfstune: %s", err); + return -1; + } + + /* FIXME currently btrfstune do not support '--help'. + * If got an invalid options, it will print its usage + * in stderr. + * We had to check it there. +...
2015 Feb 27
1
Re: [PATCH 2/4] New API: btrfstune_S_disable
...; } > + > +int > +do_btrfstune_S_disable (const char *device) > +{ > + const size_t MAX_ARGS = 64; > + const char *argv[MAX_ARGS]; > + size_t i = 0; > + CLEANUP_FREE char *err = NULL; > + CLEANUP_FREE char *out = NULL; > + int r; > + > + ADD_ARG (argv, i, str_btrfstune); > + ADD_ARG (argv, i, "-S"); > + ADD_ARG (argv, i, "0"); > + ADD_ARG (argv, i, "-f"); > + ADD_ARG (argv, i, device); > + ADD_ARG (argv, i, NULL); > + > + r = commandv (&out, &err, argv); > + if (r == -1) { > + reply_with_e...
2015 Jun 25
0
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...> + */ > > +static int > > +test_btrftune_uuid_opt (void) > > +{ > > + static int result = -1; > > + if (result != -1) > > + return result; > > + > > + CLEANUP_FREE char *err = NULL; > > + > > + int r = commandr (NULL, &err, str_btrfstune, NULL); > > + > > + if (r == -1) { > > + reply_with_error ("btrfstune: %s", err); > > + return -1; > > + } > > + > > + /* FIXME currently btrfstune do not support '--help'. > > + * If got an invalid options, it will print...
2014 Dec 05
1
Re: [PATCH 2/8] New API: btrfs_subvolume_show
...t; > +#include <assert.h> > > #include "daemon.h" > #include "actions.h" > #include "optgroups.h" > #include "xstrtol.h" > +#include "c-ctype.h" > > GUESTFSD_EXT_CMD(str_btrfs, btrfs); > GUESTFSD_EXT_CMD(str_btrfstune, btrfstune); > @@ -810,3 +812,186 @@ do_btrfs_fsck (const char *device, int64_t superblock, int repair) > > return 0; > } Ugh. 'btrfs' should have more easily parsable output. > +/* analyze_line: analyze one line contains key:value pair. > + * returns the next pos...
2015 Jul 01
5
[PATCH v5 0/3] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v5: use NOT_SUPPORTED macro improve testcases v4: introduce get_random_uuid improve testcases squash internal API patches v3.1: fix typos v3: set errno
2015 Jun 29
1
Re: [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...; +test_btrfstune_uuid_opt (void) > > > +{ > > > + static int result = -1; > > > + if (result != -1) > > > + return result; > > > + > > > + CLEANUP_FREE char *err = NULL; > > > + > > > + int r = commandr (NULL, &err, str_btrfstune, NULL); > > > + > > > + if (r == -1) { > > > + reply_with_error ("btrfstune: %s", err); > > > + return -1; > > > + } > > > + > > > + /* FIXME currently btrfstune do not support '--help'. > > > > S...
2015 Jun 26
14
[PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v3.1: fix typos v3: set errno if feature is not available. Chen Hanxiao (9): uuid: add support to change uuid of btrfs partition uuid: use existing function of