summaryrefslogtreecommitdiff
path: root/make-bcache.c
diff options
context:
space:
mode:
authorGabriel <g2p.code@gmail.com>2013-03-09 15:51:17 +0100
committerGabriel <g2p.code@gmail.com>2013-03-09 15:51:17 +0100
commit3b6ae63e496d5e7c1ebbbf570ce26379ca55499d (patch)
tree7b03328ebfb1d46830187b8502ef9e9bd6f0fff7 /make-bcache.c
parent865a3b1f0b3093ffbdf1ac91076f1c7ac7d22238 (diff)
Fix offsets, cache and backing are two different cases.
Diffstat (limited to 'make-bcache.c')
-rw-r--r--make-bcache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/make-bcache.c b/make-bcache.c
index e20a7cf..5f4ebcc 100644
--- a/make-bcache.c
+++ b/make-bcache.c
@@ -154,7 +154,7 @@ const char * const cache_replacement_policies[] = {
int writeback;
int discard;
unsigned cache_replacement_policy;
-uint64_t data_offset = 16;
+uint64_t data_offset = BDEV_DATA_START;
struct option opts[] = {
{ "cache", 0, NULL, 'C' },
@@ -194,7 +194,7 @@ void write_sb(char *dev, struct cache_sb *sb)
if (SB_BDEV(sb)) {
SET_BDEV_WRITEBACK(sb, writeback);
- if (data_offset != 16) {
+ if (data_offset != BDEV_DATA_START) {
sb->version = BCACHE_SB_BDEV_VERSION;
sb->keys = 1;
sb->d[0] = data_offset;
@@ -288,8 +288,8 @@ int main(int argc, char **argv)
break;
case 'o':
data_offset = atoll(optarg);
- if (sb.d[0] < 16) {
- printf("Bad data offset; minimum 16 sectors\n");
+ if (sb.d[0] < BDEV_DATA_START) {
+ printf("Bad data offset; minimum %d sectors\n", BDEV_DATA_START);
exit(EXIT_FAILURE);
}
break;