dm thin: don't allow messages to be sent to a pool target in READ_ONLY or FAIL mode
authorJoe Thornber <ejt@redhat.com>
Mon, 26 Jan 2015 11:38:21 +0000 (11:38 +0000)
committerMike Snitzer <snitzer@redhat.com>
Wed, 28 Jan 2015 15:00:34 +0000 (10:00 -0500)
commit2a7eaea02b99b6e267b1e89c79acc6e9a51cee3b
treebb40f7c63e44044c52d540f73c65c8b16ca1726c
parent766a78882ddf79b162243649d7dfdbac1fb6fb88
dm thin: don't allow messages to be sent to a pool target in READ_ONLY or FAIL mode

You can't modify the metadata in these modes.  It's better to fail these
messages immediately than let the block-manager deny write locks on
metadata blocks.  Otherwise these failed metadata changes will trigger
'needs_check' to get set in the metadata superblock -- requiring repair
using the thin_check utility.

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.c