summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel <g2p.code@gmail.com>2013-04-10 08:28:16 +0200
committerKent Overstreet <koverstreet@google.com>2013-04-11 17:19:10 -0700
commitdc405a8f9450fd3f115f659a9362c564f9b2152e (patch)
tree75abf88631f95151bc665f680ebd6d8512e858b7
parent944cb4ce32b7c8a090d6ecd36eef1946d85a8048 (diff)
Add a flag to pick the cache set uuid.
-rw-r--r--make-bcache.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/make-bcache.c b/make-bcache.c
index 4ab53a5..4efd8c0 100644
--- a/make-bcache.c
+++ b/make-bcache.c
@@ -136,6 +136,8 @@ void usage()
" -B, --bdev Format a backing device\n"
" -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"
@@ -268,6 +270,7 @@ int main(int argc, char **argv)
{ "discard", 0, &discard, 1 },
{ "cache_replacement_policy", 1, NULL, 'p' },
{ "data_offset", 1, NULL, 'o' },
+ { "cset-uuid", 1, NULL, 'u' },
{ "help", 0, NULL, 'h' },
{ NULL, 0, NULL, 0 },
};
@@ -308,6 +311,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;