mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-03-10 00:00:04 +03:00
Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.KERNEL/bcache-tools
Issue DAT-
This commit is contained in:
commit
aae18fb8c9
6
bcache.c
6
bcache.c
@ -505,7 +505,7 @@ void write_backingdev_sb(int fd, unsigned block_size, unsigned *bucket_sizes,
|
|||||||
sb.block_size = block_size;
|
sb.block_size = block_size;
|
||||||
|
|
||||||
uuid_unparse(sb.disk_uuid.b, uuid_str);
|
uuid_unparse(sb.disk_uuid.b, uuid_str);
|
||||||
uuid_unparse(sb.set_uuid.b, set_uuid_str);
|
uuid_unparse(sb.user_uuid.b, set_uuid_str);
|
||||||
if (label)
|
if (label)
|
||||||
memcpy(sb.label, label, SB_LABEL_SIZE);
|
memcpy(sb.label, label, SB_LABEL_SIZE);
|
||||||
|
|
||||||
@ -650,7 +650,7 @@ void write_cache_sbs(int *fds, struct cache_sb *sb,
|
|||||||
sb->csum = csum_set(sb, CACHE_SB_CSUM_TYPE(sb));
|
sb->csum = csum_set(sb, CACHE_SB_CSUM_TYPE(sb));
|
||||||
|
|
||||||
uuid_unparse(sb->disk_uuid.b, uuid_str);
|
uuid_unparse(sb->disk_uuid.b, uuid_str);
|
||||||
uuid_unparse(sb->set_uuid.b, set_uuid_str);
|
uuid_unparse(sb->user_uuid.b, set_uuid_str);
|
||||||
printf("UUID: %s\n"
|
printf("UUID: %s\n"
|
||||||
"Set UUID: %s\n"
|
"Set UUID: %s\n"
|
||||||
"version: %u\n"
|
"version: %u\n"
|
||||||
@ -833,7 +833,7 @@ static void show_super_common(struct cache_sb *sb, bool force_csum)
|
|||||||
uuid_unparse(sb->disk_uuid.b, uuid);
|
uuid_unparse(sb->disk_uuid.b, uuid);
|
||||||
printf("dev.uuid\t\t%s\n", uuid);
|
printf("dev.uuid\t\t%s\n", uuid);
|
||||||
|
|
||||||
uuid_unparse(sb->set_uuid.b, uuid);
|
uuid_unparse(sb->user_uuid.b, uuid);
|
||||||
printf("cset.uuid\t\t%s\n", uuid);
|
printf("cset.uuid\t\t%s\n", uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
bcacheadm.c
15
bcacheadm.c
@ -297,18 +297,7 @@ int make_bcache(NihCommand *command, char *const *args)
|
|||||||
cache_set_sb = calloc(1, sizeof(*cache_set_sb) +
|
cache_set_sb = calloc(1, sizeof(*cache_set_sb) +
|
||||||
sizeof(struct cache_member) * devs);
|
sizeof(struct cache_member) * devs);
|
||||||
|
|
||||||
/*
|
|
||||||
* Currently make the cache-set uuid and user_id same,
|
|
||||||
* until proper support/usage is added.
|
|
||||||
*/
|
|
||||||
if (cache_set_uuid) {
|
|
||||||
if (uuid_parse(cache_set_uuid, cache_set_sb->set_uuid.b)) {
|
|
||||||
fprintf(stderr, "Bad uuid\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
uuid_generate(cache_set_sb->set_uuid.b);
|
uuid_generate(cache_set_sb->set_uuid.b);
|
||||||
}
|
|
||||||
|
|
||||||
if (cache_set_uuid) {
|
if (cache_set_uuid) {
|
||||||
if(uuid_parse(cache_set_uuid, cache_set_sb->user_uuid.b)) {
|
if(uuid_parse(cache_set_uuid, cache_set_sb->user_uuid.b)) {
|
||||||
@ -595,7 +584,7 @@ int bcache_query_devs(NihCommand *command, char *const *args)
|
|||||||
char set_uuid_str[40], dev_uuid_str[40];
|
char set_uuid_str[40], dev_uuid_str[40];
|
||||||
char *clus_uuid = (char *)sb->label;
|
char *clus_uuid = (char *)sb->label;
|
||||||
|
|
||||||
uuid_unparse(sb->set_uuid.b, set_uuid_str);
|
uuid_unparse(sb->user_uuid.b, set_uuid_str);
|
||||||
uuid_unparse(sb->disk_uuid.b, dev_uuid_str);
|
uuid_unparse(sb->disk_uuid.b, dev_uuid_str);
|
||||||
if (!strcmp(clus_uuid, ""))
|
if (!strcmp(clus_uuid, ""))
|
||||||
clus_uuid = "None";
|
clus_uuid = "None";
|
||||||
@ -641,7 +630,7 @@ int bcache_status(NihCommand *command, char *const *args)
|
|||||||
printf("Unable to find a superblock\n");
|
printf("Unable to find a superblock\n");
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
uuid_unparse(seq_sb->set_uuid.b, set_uuid);
|
uuid_unparse(seq_sb->user_uuid.b, set_uuid);
|
||||||
printf("%-50s%-15s%-4s\n", "uuid", "state", "tier");
|
printf("%-50s%-15s%-4s\n", "uuid", "state", "tier");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user