]> git.baikalelectronics.ru Git - kernel.git/commit
dm thin: allow metadata commit if pool is in PM_OUT_OF_DATA_SPACE mode
authorJoe Thornber <ejt@redhat.com>
Tue, 6 May 2014 15:28:14 +0000 (16:28 +0100)
committerMike Snitzer <snitzer@redhat.com>
Wed, 14 May 2014 20:11:36 +0000 (16:11 -0400)
commitd3ff47b9652679ed8a82cb47584744667c47c738
treee6370d1b7b267267d7e8b3913f2e4a0d77de62b6
parent96102f0e25c42a3a2d9c82619cdc92d787220c99
dm thin: allow metadata commit if pool is in PM_OUT_OF_DATA_SPACE mode

Commit 2ed403e5 ("dm thin: fix out of data space handling") introduced
a regression in the metadata commit() method by returning an error if
the pool is in PM_OUT_OF_DATA_SPACE mode.  This oversight caused a thin
device to return errors even if the default queue_if_no_space ENOSPC
handling mode is used.

Fix commit() to only fail if pool is in PM_READ_ONLY or PM_FAIL mode.

Reported-by: qindehua@163.com
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.14+
drivers/md/dm-thin.c