]> git.ipfire.org Git - people/arne_f/kernel.git/commit
dm thin: restore requested 'error_if_no_space' setting on OODS to WRITE transition
authorMike Snitzer <snitzer@redhat.com>
Fri, 6 Nov 2015 15:53:01 +0000 (10:53 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:06:45 +0000 (15:06 -0800)
commit613c515dc0462beba95912ac8a077c9878dcf768
tree9376e729aa7e0544e9abddc0e9d6409c8e0581e0
parent9dd9ef83bef5cbbcfc33d834c07ba5d8dd7753ed
dm thin: restore requested 'error_if_no_space' setting on OODS to WRITE transition

commit 172c238612ebf81cabccc86b788c9209af591f61 upstream.

A thin-pool that is in out-of-data-space (OODS) mode may transition back
to write mode -- without the admin adding more space to the thin-pool --
if/when blocks are released (either by deleting thin devices or
discarding provisioned blocks).

But as part of the thin-pool's earlier transition to out-of-data-space
mode the thin-pool may have set the 'error_if_no_space' flag to true if
the no_space_timeout expires without more space having been made
available.  That implementation detail, of changing the pool's
error_if_no_space setting, needs to be reset back to the default that
the user specified when the thin-pool's table was loaded.

Otherwise we'll drop the user requested behaviour on the floor when this
out-of-data-space to write mode transition occurs.

Reported-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Fixes: 2c43fd26e4 ("dm thin: fix missing out-of-data-space to write mode transition if blocks are released")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-thin.c