Permalink
Browse files

Add a flag to pick the cache set uuid.

  • Loading branch information...
1 parent 2b8d6cc commit e4f4f5b283fa06273c019baf61a7a1df2ed8bff8 @g2p committed Apr 10, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 make-bcache.c
View
@@ -137,6 +137,7 @@ void usage()
" -b, --bucket bucket size\n"
" -w, --block block size (hard sector size of SSD, often 2k)\n"
" -o, --data-offset data offset in sectors\n"
+ " --cset-uuid UUID for the cache set\n"
// " -U UUID\n"
" --writeback enable writeback\n"
" --discard enable discards\n"
@@ -166,6 +167,7 @@ struct option opts[] = {
{ "discard", 0, &discard, 1 },
{ "cache_replacement_policy", 1, NULL, 'p' },
{ "data-offset-sectors", 1, NULL, 'o' },
+ { "cset-uuid", 1, NULL, 'u' },
{ "help", 0, NULL, 'h' },
{ NULL, 0, NULL, 0 },
};
@@ -296,6 +298,12 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
break;
+ case 'u':
+ if (uuid_parse(optarg, sb->set_uuid)) {
+ printf("Bad uuid\n");
+ exit(EXIT_FAILURE);
+ }
+ break;
case 'h':
usage();
break;

0 comments on commit e4f4f5b

Please sign in to comment.