[linux-lvm] bcache and dm targets (specifically lvm)

Mike Snitzer snitzer at redhat.com
Sun Mar 4 14:21:40 UTC 2012

On Fri, Mar 02 2012 at  9:28pm -0500,
Joseph Glanville <joseph.glanville at orionvm.com.au> wrote:

> Ahh!
> I didn't know LVM had a device type lookup table. You can see if you
> look further that it also reads new types from the lvm.conf file.
> Adding this line to lvm.conf fixes the problem:
> types = [ "bcache", 16 ]
> I would imagine if merged it would be added to the internal compiled in table.

Assuming bcache devices are partitionable 16 would be used (like patch
below), if they aren't then 1 would be used.


I know you were frustrated with DM in the past and that is why you
created your own device type.

I'll be looking much closer at bcache in the next week or so.  I'm
starting to work on a DM-based caching target... it will re-use the
drivers/md/persistent-data/ infrastructure we've established as part of
the DM Thin Provisioning target.

Anyway, even if bcache remains to be a standalone (non-DM) block device
in the future I'll have a look at it with an eye toward code sharing
that might allow other caching layers to build on a common layer.  Even
if the common code is a policy engine I think it'd be cool to allow
sharing of policy across caching targets.

That said I'm also open to porting bcache to DM... but time will tell.
I'll grab the latest bcache code and jump on the linux-bcache list and
we can take it one step at a time.

 lib/filters/filter.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/filters/filter.c b/lib/filters/filter.c
index 4c3d3b7..f4a9615 100644
--- a/lib/filters/filter.c
+++ b/lib/filters/filter.c
@@ -129,6 +129,7 @@ static const device_info_t device_info[] = {
 	{"mmc", 16},		/* MMC block device */
 	{"blkext", 1},		/* Extended device partitions */
 	{"fio", 16},		/* Fusion */
+	{"bcache", 16},		/* bcache */
 	{NULL, 0}

More information about the linux-lvm mailing list