the devices in the super-block.
bcache.h: Bring version information to the latest kernel version.
bcache-super-show.c: Add setsize for caching devices. This indicates
the number of devices in caching set.
Testing done:
1.0 make-bcache with --label option and checking back to see if
bcache-super-show shows the devices.
2.0 bcache-super-show does not bail if version is 5.
3.0 bcache-super-show shows the correct setsize.
Change-Id: If0f1ec6204b233b34ff4c8a57a8809d2c8dbe3e3
Fail if the device has any leftover superblock or partition table label.
Add a --wipe-bcache flag to overwrite bcache superblocks and recommend
wipefs for non-bcache superblocks.
Once the device is safe to write, always zero immediately before the
bcache superblock.
Make sure errors go to stderr. Use pkg-config.
As discussed on irc yesterday.
Cheers,
Lars
From 791a4b7b2c25e21ffeb4184da5e61f18cde86246 Mon Sep 17 00:00:00 2001
From: Lars Ellenberg <lars@linbit.com>
Date: Wed, 17 Jul 2013 11:49:12 +0200
Subject: [PATCH] make-bcache: fix guessing of "block_size" to use BLKSSZGET
Using stat.st_blocksize is wrong:
that is the linux buffer cache granularity,
it is tunable, and defaults to 4k.
This caused bcache to default to create devices with
logical_block_size = 4k, potentially breaking otherwise healthy disk
or file system images unnecessarily.
e.g. some xfs image previously created with 512 byte "sector size"
would, once bcache'd, refuse to mount with
mount: function not implemented
device supports 4096 byte sectors (not 512)
We want the logical_block_size here.