- DM verity fix for crash due to using vmalloc'd buffers with the
  asynchronous crypto hadsh API.

- Fix to both DM crypt and DM integrity targets to discontinue using
  CRYPTO_TFM_REQ_MAY_SLEEP because its use of GFP_KERNEL can lead to
  deadlock by recursing back into a filesystem.

- Various DM raid fixes related to reshape and rebuild races.

- Fix for DM thin-provisioning to avoid data corruption that was a
  side-effect of needing to abort DM thin metadata transaction due to
  running out of metadata space.  Fix is to reserve a small amount of
  metadata space so that once it is used the DM thin-pool can finish its
  active transaction before switching to read-only mode.
dm thin metadata: try to avoid ever aborting transactions

Committing a transaction can consume some metadata of it's own, we now
reserve a small amount of metadata to cover this.  Free metadata
reported by the kernel will not include this reserve.

If any of the reserve has been used after a commit we enter a new
internal state PM_OUT_OF_METADATA_SPACE.  This is reported as
PM_READ_ONLY, so no userland changes are needed.  If the metadata
device is resized the pool will move back to PM_WRITE.

These changes mean we never need to abort and rollback a transaction due
to running out of metadata space.  This is particularly important
because there have been a handful of reports of data corruption against
DM thin-provisioning that can all be attributed to the thin-pool having
ran out of metadata space.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2 files changed