Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.KERNEL/bcache-tools

Issue DAT-
This commit is contained in:
jenkins 2015-01-29 18:11:19 -08:00
commit aae18fb8c9
2 changed files with 6 additions and 17 deletions

View File

@ -505,7 +505,7 @@ void write_backingdev_sb(int fd, unsigned block_size, unsigned *bucket_sizes,
sb.block_size = block_size;
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)
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));
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"
"Set UUID: %s\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);
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);
}

View File

@ -297,18 +297,7 @@ int make_bcache(NihCommand *command, char *const *args)
cache_set_sb = calloc(1, sizeof(*cache_set_sb) +
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);
}
if (cache_set_uuid) {
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 *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);
if (!strcmp(clus_uuid, ""))
clus_uuid = "None";
@ -641,7 +630,7 @@ int bcache_status(NihCommand *command, char *const *args)
printf("Unable to find a superblock\n");
return -1;
} 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");
}