2 stable fixes for dm-cache and 1 3.19 DM core fix:

- Fix potential for dm-cache metadata corruption via stale metadata
  buffers being used when switching an inactive cache table to active;
  this could occur due to each table having it's own bufio client rather
  than sharing the client between tables.

- Fix dm-cache target to properly account for discard IO while
  suspending otherwise IO quiescing could complete prematurely.

- Fix DM core's handling of multiple internal suspends by maintaining an
  'internal_suspend_count' and only resuming the device when this count
  drops to zero.
dm: fix handling of multiple internal suspends

Commit ffcc393641 ("dm: enhance internal suspend and resume interface")
attempted to handle multiple internal suspends on the same device, but
it did that incorrectly.  When these functions are called in this order
on the same device the device is no longer suspended, but it should be:
	dm_internal_suspend_noflush
	dm_internal_suspend_noflush
	dm_internal_resume

Fix this bug by maintaining an 'internal_suspend_count' and resuming
the device when this count drops to zero.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 file changed