Displaying 20 results from an estimated 29 matches for "btrfs_set_uuid".
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 26
0
[PATCH v3 1/4] uuid: add support to change uuid of btrfs partition
...(err, "-U") == NULL || strstr (err, "-u") == NULL)
+ result = 0;
+ else
+ result = 1;
+
+ return result;
+}
+
int
do_btrfs_set_seeding (const char *device, int svalue)
{
@@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue)
return 0;
}
+int
+btrfs_set_uuid (const char *device, const char *uuid)
+{
+ CLEANUP_FREE char *err = NULL;
+ int r;
+ int has_uuid_opts = test_btrftune_uuid_opt ();
+
+ if (has_uuid_opts <= 0) {
+ reply_with_error_errno (ENOTSUP, "btrfs filesystems' UUID cannot be changed");
+ return -1;
+ }
+
+ r = c...
2015 Jun 26
0
[PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...(err, "-U") == NULL || strstr (err, "-u") == NULL)
+ result = 0;
+ else
+ result = 1;
+
+ return result;
+}
+
int
do_btrfs_set_seeding (const char *device, int svalue)
{
@@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue)
return 0;
}
+int
+btrfs_set_uuid (const char *device, const char *uuid)
+{
+ CLEANUP_FREE char *err = NULL;
+ int r;
+ int has_uuid_opts = test_btrfstune_uuid_opt ();
+
+ if (has_uuid_opts <= 0) {
+ reply_with_error_errno (ENOTSUP, "btrfs filesystems' UUID cannot be changed");
+ return -1;
+ }
+
+ r =...
2015 Jun 30
0
[PATCH v4 1/7] uuid: add support to change uuid of btrfs partition
...(err, "-U") == NULL || strstr (err, "-u") == NULL)
+ result = 0;
+ else
+ result = 1;
+
+ return result;
+}
+
int
do_btrfs_set_seeding (const char *device, int svalue)
{
@@ -814,6 +852,28 @@ do_btrfs_set_seeding (const char *device, int svalue)
return 0;
}
+int
+btrfs_set_uuid (const char *device, const char *uuid)
+{
+ CLEANUP_FREE char *err = NULL;
+ int r;
+ int has_uuid_opts = test_btrfstune_uuid_opt ();
+
+ if (has_uuid_opts <= 0) {
+ reply_with_error_errno (ENOTSUP, "btrfs filesystems' UUID cannot be changed");
+ return -1;
+ }
+
+ r =...
2015 Jun 26
5
[PATCH v3 0/4] 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 existing functions.
v3: set errno if feature is not available.
Chen Hanxiao (4):
uuid: add support to change uuid of btrfs partition
uuid: use existing function of ext2
uuid: use newly introduced
2015 Jun 30
13
[PATCH v4 0/7] 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.
v4: introduce get_random_uuid
improve testcases
squash internal API patches
v3.1: fix typos
v3: set errno if feature is not available.
Chen Hanxiao (7):
2015 Jun 26
14
[PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random
.... 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 ext2
uuid: use newly introduced xfs_set_uuid of xfs
uuid: use newly introduced swap_set_uuid
New API: btrfs_set_uuid_random
New API: set_e2uuid_random
New API: swap_set_uuid_random
New API: xfs_set_uuid_random
New API: set_uuid_random
daemon/btrfs.c | 81 ++++++++++++++++++++++++++++++++++++++++++
daemon/daemon.h | 10 ++++++
daemon/ext2.c | 15 ++++++++
d...
2015 Jul 02
1
[PATCH v6] New API: set_uuid_random
...+++++++++++++++++
src/MAX_PROC_NR | 2 +-
tests/btrfs/test-btrfs-misc.pl | 14 ++++++++++++++
8 files changed, 101 insertions(+), 1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 28a48cf..8fcfd81 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -872,6 +872,25 @@ btrfs_set_uuid (const char *device, const char *uuid)
return 0;
}
+int
+btrfs_set_uuid_random (const char *device)
+{
+ CLEANUP_FREE char *err = NULL;
+ int r;
+ int has_uuid_opts = test_btrfstune_uuid_opt();
+
+ if (has_uuid_opts <= 0)
+ NOT_SUPPORTED(-1, "btrfs filesystems' UUID cannot...
2015 Jun 24
2
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...rn result;
> +}
> +
> int
> do_btrfs_set_seeding (const char *device, int svalue)
> {
> @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue)
> return 0;
> }
>
> +int
> +btrfstune_set_uuid (const char *device, const char *uuid)
Call it btrfs_set_uuid please, as the fact that it uses btrfstune is an
implementation detail of it.
> +{
> + CLEANUP_FREE char *err = NULL;
> + int r;
> + int has_uuid_opts = test_btrftune_uuid_opt ();
> +
> + if (has_uuid_opts == 0) {
Check for <= 0 here, to consider errors in test_btrftune_u...
2015 Jun 30
0
[PATCH v4 4/7] uuid: use newly introduced swap_set_uuid
...mon.h | 3 +++
daemon/swap.c | 16 ++++++++++++++++
daemon/uuids.c | 18 +-----------------
3 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index cbe8ada..d8a5e0b 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -276,6 +276,9 @@ extern int btrfs_set_uuid (const char *device, const char *uuid);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
+/*-- in swap.c --*/
+extern int swap_set_uuid (const char *device, const char *uuid);
+
/* ordinary daemon functions use these to indicate errors
* NB: you don't need to prefix...
2015 Jul 06
1
[PATCH] uuids: return ENOTSUP if could not set UUID for specific fs
...+++
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/daemon/uuids.c b/daemon/uuids.c
index 20eabe3..00c47d8 100644
--- a/daemon/uuids.c
+++ b/daemon/uuids.c
@@ -77,11 +77,9 @@ do_set_uuid (const char *device, const char *uuid)
else if (STREQ (vfs_type, "btrfs"))
r = btrfs_set_uuid (device, uuid);
- else {
- reply_with_error ("don't know how to set the UUID for '%s' filesystems",
+ else
+ NOT_SUPPORTED(-1, "don't know how to set the UUID for '%s' filesystems",
vfs_type);
- r = -1;
- }
return...
2015 Jun 30
0
[PATCH v4 6/7] daemon: add functions for setting random uuid of fs
...on/daemon.h | 4 ++++
daemon/ext2.c | 15 +++++++++++++++
daemon/swap.c | 13 +++++++++++++
daemon/xfs.c | 7 +++++++
5 files changed, 60 insertions(+)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 4cdc6a7..2b0cae9 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -874,6 +874,27 @@ btrfs_set_uuid (const char *device, const char *uuid)
return 0;
}
+int
+btrfs_set_uuid_random (const char *device)
+{
+ CLEANUP_FREE char *err = NULL;
+ int r;
+ int has_uuid_opts = test_btrfstune_uuid_opt();
+
+ if (has_uuid_opts <= 0) {
+ reply_with_error_errno (ENOTSUP, "btrfs filesystems&...
2015 Jul 01
0
[PATCH v5 3/3] New API: set_uuid_random
...++++++++++++++++
src/MAX_PROC_NR | 2 +-
tests/btrfs/test-btrfs-misc.pl | 15 +++++++++++++++
8 files changed, 100 insertions(+), 1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 28a48cf..8fcfd81 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -872,6 +872,25 @@ btrfs_set_uuid (const char *device, const char *uuid)
return 0;
}
+int
+btrfs_set_uuid_random (const char *device)
+{
+ CLEANUP_FREE char *err = NULL;
+ int r;
+ int has_uuid_opts = test_btrfstune_uuid_opt();
+
+ if (has_uuid_opts <= 0)
+ NOT_SUPPORTED(-1, "btrfs filesystems' UUID cannot...
2015 Jun 25
0
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...o_btrfs_set_seeding (const char *device, int svalue)
> > {
> > @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue)
> > return 0;
> > }
> >
> > +int
> > +btrfstune_set_uuid (const char *device, const char *uuid)
>
> Call it btrfs_set_uuid please, as the fact that it uses btrfstune is an
> implementation detail of it.
>
> > +{
> > + CLEANUP_FREE char *err = NULL;
> > + int r;
> > + int has_uuid_opts = test_btrftune_uuid_opt ();
> > +
> > + if (has_uuid_opts == 0) {
>
> Check for &...
2015 Jun 26
3
Re: [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...result = 0;
> + else
> + result = 1;
> +
> + return result;
> +}
> +
> int
> do_btrfs_set_seeding (const char *device, int svalue)
> {
> @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue)
> return 0;
> }
>
> +int
> +btrfs_set_uuid (const char *device, const char *uuid)
> +{
> + CLEANUP_FREE char *err = NULL;
> + int r;
> + int has_uuid_opts = test_btrfstune_uuid_opt ();
> +
> + if (has_uuid_opts <= 0) {
> + reply_with_error_errno (ENOTSUP, "btrfs filesystems' UUID cannot be changed&quo...
2015 Jul 13
1
[PATCH] daemon: add a space after func name to fit code-style
...@@ error:
}
static char **
-blkid_without_p_i_opt(const char *device)
+blkid_without_p_i_opt (const char *device)
{
char *s;
DECLARE_STRINGSBUF (ret);
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index ee3464d..50b0ba8 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -876,7 +876,7 @@ btrfs_set_uuid (const char *device, const 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 = c...
2015 Oct 27
1
[PATCHv3] Added btrfs support to vfs_minimum_size.
...RTOD64
+
+ return ret;
+}
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 8bcc9bd..4a969dd 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -280,6 +280,7 @@ extern char *btrfs_get_label (const char *device);
extern int btrfs_set_label (const char *device, const char *label);
extern int btrfs_set_uuid (const char *device, const char *uuid);
extern int btrfs_set_uuid_random (const char *device);
+extern int64_t btrfs_minimum_size (const char *path);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c
index 4f93f8c..ca7...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...OD64
+
+ return ret;
+}
+
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 8bcc9bd..4a969dd 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -280,6 +280,7 @@ extern char *btrfs_get_label (const char *device);
extern int btrfs_set_label (const char *device, const char *label);
extern int btrfs_set_uuid (const char *device, const char *uuid);
extern int btrfs_set_uuid_random (const char *device);
+extern int64_t btrfs_minimum_size (const char *path);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
diff --git a/daemon/fs-min-size.c b/daemon/fs-min-size.c
index 4f93f8c..cb6...
2015 Jul 08
0
[PATCH 1/5] labels: move btrfslabel to btrfs.c
...- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -275,6 +275,7 @@ extern char *debug_bmap_device (const char *subcmd, size_t argc, char *const *co
/*-- in btrfs.c --*/
extern char *btrfs_get_label (const char *device);
+extern int btrfs_set_label (const char *device, const char *label);
extern int btrfs_set_uuid (const char *device, const char *uuid);
extern int btrfs_set_uuid_random (const char *device);
diff --git a/daemon/labels.c b/daemon/labels.c
index cfcb4df..eec5b96 100644
--- a/daemon/labels.c
+++ b/daemon/labels.c
@@ -27,29 +27,12 @@
#include "actions.h"
#include "optgroups.h&...
2015 Oct 23
0
Re: [PATCH] Added btrfs support for vfs_min_size.
...f --git a/daemon/daemon.h b/daemon/daemon.h
> index 8bcc9bd..4a969dd 100644
> --- a/daemon/daemon.h
> +++ b/daemon/daemon.h
> @@ -280,6 +280,7 @@ extern char *btrfs_get_label (const char *device);
> extern int btrfs_set_label (const char *device, const char *label);
> extern int btrfs_set_uuid (const char *device, const char *uuid);
> extern int btrfs_set_uuid_random (const char *device);
> +extern int64_t btrfs_minimum_size (const char *path);
>
> /*-- in ntfs.c --*/
> extern char *ntfs_get_label (const char *device);
> diff --git a/daemon/fs-min-size.c b/daemon/fs...