dm thin: support read only external snapshot origins
commit2dd9c257fbc243aa76ee6db0bb8371f9f74fad2d
authorJoe Thornber <ejt@redhat.com>
Wed, 28 Mar 2012 17:41:28 +0000 (28 18:41 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 28 Mar 2012 17:41:28 +0000 (28 18:41 +0100)
tree51c82de6e41b4f53f9d41dfe1211c4feba55dc6d
parentc4a69ecdb463a901b4645230613961e134e897cd
dm thin: support read only external snapshot origins

Support the use of an external _read only_ device as an origin for a thin
device.

Any read to an unprovisioned area of the thin device will be passed
through to the origin.  Writes trigger allocation of new blocks as
usual.

One possible use case for this would be VM hosts that want to run
guests on thinly-provisioned volumes but have the base image on another
device (possibly shared between many VMs).

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Documentation/device-mapper/thin-provisioning.txt
drivers/md/dm-thin.c