~curtin-dev/curtin/trunk

Viewing all changes in revision 492.

  • Committer: Ryan Harper
  • Date: 2017-04-24 17:56:04 UTC
  • mfrom: (485.1.10 trunk.nvme_bcache)
  • Revision ID: ryan.harper@canonical.com-20170424175604-u6rms6dyh8gk8ihi
clear-holders: make bcache handler wait for device shutdown

Clear-holder's bcache shutdown handler does not wait for devices owned by
bcache driver to be released before returning. On sufficiently fast
systems (and with multiple cpus) the time for bcache to release the
backing devices may occur slower than the time it takes for curtin to
start attempting to wipe partition data on a backing device. This results
in an IO error due to curtin asserting exclusive access to a device for
wiping.

This series introduces some additional logic in the bcache shutdown
handler by testing that the bcache devices are removed before returning
from the handler.

If the underlying devices are not released, the handler raises an
exception.

Fixes: LP:#1680409

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: