• Joe Thornber's avatar
    dm thin: fix noflush suspend IO queueing · 738211f7
    Joe Thornber authored
    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: default avatarJoe Thornber <ejt@redhat.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    738211f7
dm-thin.c 81.6 KB