diff options
author | jenkins <sms@daterainc.com> | 2015-01-29 18:11:19 -0800 |
---|---|---|
committer | jenkins <sms@daterainc.com> | 2015-01-29 18:11:19 -0800 |
commit | aae18fb8c9aff762ea28b7b702546d50a0bede38 (patch) | |
tree | 5b864b9b0aa93bf495aad72db0b15c219af6f304 | |
parent | b0ed54d843e4034988dea2a596bac8d2601f116e (diff) | |
parent | c6fd0321f8e9bc11ca448befc8815308562f0f90 (diff) |
Merge branch 'master' of ssh://gits.daterainc.com:2984/project/2013.KERNEL/bcache-tools
Issue DAT-
-rw-r--r-- | bcache.c | 6 | ||||
-rw-r--r-- | bcacheadm.c | 17 |
2 files changed, 6 insertions, 17 deletions
@@ -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); } diff --git a/bcacheadm.c b/bcacheadm.c index ee1a7d8..0a7585f 100644 --- a/bcacheadm.c +++ b/bcacheadm.c @@ -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); - } + 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"); } |