]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache: fix a race condition between queuing new migrations and quiescing for a...
authorJoe Thornber <ejt@redhat.com>
Wed, 30 Oct 2013 17:11:58 +0000 (17:11 +0000)
committerMike Snitzer <snitzer@redhat.com>
Sat, 9 Nov 2013 22:55:50 +0000 (17:55 -0500)
commitc9052940c7bfa02a323e5e76cebe765feeda2931
tree912a236582629a69e29ab5208fd0bdac61ee9d07
parent2736c57d917a4e1ce1c601b47b301dc0b8ba0375
dm cache: fix a race condition between queuing new migrations and quiescing for a shutdown

The code that was trying to do this was inadequate.  The postsuspend
method (in ioctl context), needs to wait for the worker thread to
acknowledge the request to quiesce.  Otherwise the migration count may
drop to zero temporarily before the worker thread realises we're
quiescing.  In this case the target will be taken down, but the worker
thread may have issued a new migration, which will cause an oops when
it completes.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.9+
drivers/md/dm-cache-target.c