]> git.baikalelectronics.ru Git - kernel.git/commit
dm thin: fix noflush suspend IO queueing
authorJoe Thornber <ejt@redhat.com>
Mon, 3 Mar 2014 15:52:28 +0000 (15:52 +0000)
committerMike Snitzer <snitzer@redhat.com>
Wed, 5 Mar 2014 20:26:59 +0000 (15:26 -0500)
commitc8cbea5fe2245d2663b19b0397698700c62a69d3
treec18a2183962a4498ef247c01dac98c54f5c95108
parent82ab1e79ac2c456f1b9915f0d408a92030c8d1cd
dm thin: fix noflush suspend IO queueing

i) by the time DM core calls the postsuspend hook the dm_noflush flag
has been cleared.  So the old thin_postsuspend did nothing.  We need to
use the presuspend hook instead.

ii) There was a race between bios leaving DM core and arriving in the
deferred queue.

thin_presuspend now sets a 'requeue' flag causing all bios destined for
that thin to be requeued back to DM core.  Then it requeues all held IO,
and all IO on the deferred queue (destined for that thin).  Finally
postsuspend clears the 'requeue' flag.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-thin.c