dm thin: allow pool in read-only mode to transition to read-write mode
authorJoe Thornber <ejt@redhat.com>
Wed, 4 Dec 2013 21:58:19 +0000 (16:58 -0500)
committerMike Snitzer <snitzer@redhat.com>
Tue, 10 Dec 2013 21:35:13 +0000 (16:35 -0500)
commit9b7aaa64f96f7ca280d75326fca42f42017b89ef
treea0028aeb56bc229e9bc7b1dfcecbb3f03d213131
parent5383ef3a929a1366e2ced45cd6d74be7aa2a2281
dm thin: allow pool in read-only mode to transition to read-write mode

A thin-pool may be in read-only mode because the pool's data or metadata
space was exhausted.  To allow for recovery, by adding more space to the
pool, we must allow a pool to transition from PM_READ_ONLY to PM_WRITE
mode.  Otherwise, running out of space will render the pool permanently
read-only.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
drivers/md/dm-thin-metadata.c
drivers/md/dm-thin-metadata.h
drivers/md/dm-thin.c
drivers/md/persistent-data/dm-block-manager.c
drivers/md/persistent-data/dm-block-manager.h