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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2013 15:49:05 +0000 (07:49 -0800)
commit3e9c394744efc5d872bce0762637e31d7f54cda6
tree7146d25054e29f8ad3ae4753bcc5be64fb9ab145
parent6aa06206adee5208abb1f2313fa0017e099ec9a4
dm thin: allow pool in read-only mode to transition to read-write mode

commit 9b7aaa64f96f7ca280d75326fca42f42017b89ef upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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