Displaying 20 results from an estimated 32 matches for "btrfs_set_uuid_random".
2015 Jul 02
1
[PATCH v6] New API: set_uuid_random
...rfs-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 be changed");
+
+ r = commandr (NULL, &err, str_btrfstune, "-f",...
2015 Jul 01
0
[PATCH v5 3/3] New API: set_uuid_random
...fs-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 be changed");
+
+ r = commandr (NULL, &err, str_btrfstune, "-f",...
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 30
0
[PATCH v4 6/7] daemon: add functions for setting random uuid of fs
...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' UUID cannot be changed");
+ return -1;
+ }
+
+ r = commandr (NULL, &am...
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 ++++++++
daemon/s...
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 Jul 13
1
[PATCH] daemon: add a space after func name to fit code-style
...;= 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)
- NOT_SUPPORTED(-1, "btrfs filesystems' UUID cannot be changed");
+ NOT_SUPPOR...
2015 Oct 27
1
[PATCHv3] Added btrfs support to vfs_minimum_size.
...emon.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..ca71c4d 100644
--- a/daemon/fs-min-size.c
+++ b/daemon/fs-min-size.c
@@ -25,1...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...emon.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..cb67b6f 100644
--- a/daemon/fs-min-size.c
+++ b/daemon/fs-min-size.c
@@ -21,1...
2015 Jun 26
0
[PATCH v3.1 9/9] New API: set_uuid_random
...ype_is_extfs (vfs_type))
+ r = set_e2uuid_random (device);
+
+ else if (STREQ (vfs_type, "xfs"))
+ r = xfs_set_uuid_random (device);
+
+ else if (STREQ (vfs_type, "swap"))
+ r = swap_set_uuid_random (device);
+
+ else if (STREQ (vfs_type, "btrfs"))
+ r = btrfs_set_uuid_random (device);
+
+ else {
+ reply_with_error ("don't know how to set the random UUID for '%s' filesystems",
+ vfs_type);
+ r = -1;
+ }
+
+ return r;
+}
diff --git a/generator/actions.ml b/generator/actions.ml
index d5e5ccf..0328858 100644
--- a/generat...
2015 Jun 26
0
Re: [PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random
...;
> v3.1: fix typos
> v3: set errno if feature is not available.
>
> Chen Hanxiao (9):
> [...]
> uuid: use existing function of ext2
> uuid: use newly introduced xfs_set_uuid of xfs
> uuid: use newly introduced swap_set_uuid
These commits look good.
> 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
New internal functions are not "new API" -- that is used for user-facing
APIs, such as set_uuid_random.
Could you also please squash them together,...
2015 Jun 30
0
[PATCH v4 7/7] New API: set_uuid_random
...ype_is_extfs (vfs_type))
+ r = set_e2uuid_random (device);
+
+ else if (STREQ (vfs_type, "xfs"))
+ r = xfs_set_uuid_random (device);
+
+ else if (STREQ (vfs_type, "swap"))
+ r = swap_set_uuid_random (device);
+
+ else if (STREQ (vfs_type, "btrfs"))
+ r = btrfs_set_uuid_random (device);
+
+ else {
+ reply_with_error_errno (ENOTSUP, "don't know how to set the random UUID for '%s' filesystems",
+ vfs_type);
+ r = -1;
+ }
+
+ return r;
+}
diff --git a/generator/actions.ml b/generator/actions.ml
index 372e50e..52404ab 10064...
2015 Jul 08
0
[PATCH 1/5] labels: move btrfslabel to btrfs.c
...n 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"
-GUESTFSD_EXT_CMD(str_btrfs, btrfs);
GUESTFSD_EXT_CMD(str_dosfsla...
2015 Jul 08
0
[PATCH 3/5] labels: move ntfslabel to ntfs.c
...| 1 +
daemon/labels.c | 22 +---------------------
daemon/ntfs.c | 19 +++++++++++++++++++
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 0731b09..7a4b97f 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -282,6 +282,7 @@ extern int btrfs_set_uuid_random (const char *device);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
+extern int ntfs_set_label (const char *device, const char *label);
/*-- in swap.c --*/
extern int swap_set_uuid (const char *device, const char *uuid);
diff --git a/daemon/labels.c b/daemon/labels.c...
2015 Jul 08
9
[PATCH 0/5] labels: rework
We should use the existing function from specific fs,
if not, move it to specific fs files.
Chen Hanxiao (5):
label: move btrfslabel to btrfs.c
label: move e2label to ext2.c and call it locally
label: move ntfslabel to ntfs.c
label: use existing do_xfs_admin for xfslabel
labels: return ENOTSUP if could not set label for specific fs
daemon/btrfs.c | 16 +++++++++++
daemon/daemon.h |
2015 Oct 23
0
Re: [PATCH] Added btrfs support for vfs_min_size.
...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..cb67b6f 100644
> --- a/daemon/fs-min-size.c...
2015 Oct 23
1
[PATCHv2] Added btrfs support for vfs_min_size.
...emon.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..e43237b 100644
--- a/daemon/fs-min-size.c
+++ b/daemon/fs-min-size.c
@@ -18,1...
2015 Oct 16
0
[PATCH 1/2] New API: get_min_size
...daemon/Makefile.am
@@ -116,6 +116,7 @@ guestfsd_SOURCES = \
findfs.c \
fill.c \
find.c \
+ fs-min-size.c \
fsck.c \
fstrim.c \
glob.c \
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 508691a..8287a99 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -283,6 +283,7 @@ extern int btrfs_set_uuid_random (const char *device);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
extern int ntfs_set_label (const char *device, const char *label);
+extern int64_t ntfs_get_min_size (const char *device);
/*-- in swap.c --*/
extern int swap_set_uuid (const char *device, const char *...
2015 Oct 19
0
[PATCH 1/2] New API: vfs_min_size
...daemon/Makefile.am
@@ -116,6 +116,7 @@ guestfsd_SOURCES = \
findfs.c \
fill.c \
find.c \
+ fs-min-size.c \
fsck.c \
fstrim.c \
glob.c \
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 508691a..a690152 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -283,6 +283,7 @@ extern int btrfs_set_uuid_random (const char *device);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
extern int ntfs_set_label (const char *device, const char *label);
+extern int64_t ntfs_min_size (const char *device);
/*-- in swap.c --*/
extern int swap_set_uuid (const char *device, const char *uuid...
2015 Oct 20
0
[PATCHv3 1/2] New API: vfs_min_size
...daemon/Makefile.am
@@ -116,6 +116,7 @@ guestfsd_SOURCES = \
findfs.c \
fill.c \
find.c \
+ fs-min-size.c \
fsck.c \
fstrim.c \
glob.c \
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 508691a..3b0266d 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -283,6 +283,7 @@ extern int btrfs_set_uuid_random (const char *device);
/*-- in ntfs.c --*/
extern char *ntfs_get_label (const char *device);
extern int ntfs_set_label (const char *device, const char *label);
+extern int64_t ntfs_minimum_size (const char *device);
/*-- in swap.c --*/
extern int swap_set_uuid (const char *device, const char *...