mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Add temporary debug code to allow better debugging of races
with various udev-event tools which wrongly scan and open internal temporary cryptsetup devices. If cryptsetup run in debug mode (--debug) and remove of device fails, code scan /proc directory and tries to find process name which locked that device. git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@141 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -249,6 +249,8 @@ int dm_remove_device(const char *name, int force, uint64_t size)
|
||||
if (--retries && r) {
|
||||
log_dbg("WARNING: other process locked internal device %s, %s.",
|
||||
name, retries ? "retrying remove" : "giving up");
|
||||
if (force && (crypt_get_debug_level() == CRYPT_LOG_DEBUG))
|
||||
debug_processes_using_device(name);
|
||||
sleep(1);
|
||||
if (force && !error_target) {
|
||||
/* If force flag is set, replace device with error, read-only target.
|
||||
|
||||
Reference in New Issue
Block a user