Commit bbc3339b authored by Milan Broz's avatar Milan Broz

Switch on retry on device remove for libdevmapper.

parent f720affe
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* Fix loop mapping on readonly file. * Fix loop mapping on readonly file.
* Relax --shared test, allow mapping even for overlapping segments. * Relax --shared test, allow mapping even for overlapping segments.
* Support shared flag for LUKS devices (dangerous). * Support shared flag for LUKS devices (dangerous).
* Switch on retry on device remove for libdevmapper.
2012-04-09 Milan Broz <gmazyland@gmail.com> 2012-04-09 Milan Broz <gmazyland@gmail.com>
* Fix header check to support old (cryptsetup 1.0.0) header alignment. (1.4.0) * Fix header check to support old (cryptsetup 1.0.0) header alignment. (1.4.0)
......
...@@ -166,6 +166,7 @@ LIBS=$saved_LIBS ...@@ -166,6 +166,7 @@ LIBS=$saved_LIBS
LIBS="$LIBS $DEVMAPPER_LIBS" LIBS="$LIBS $DEVMAPPER_LIBS"
AC_CHECK_DECLS([dm_task_secure_data], [], [], [#include <libdevmapper.h>]) AC_CHECK_DECLS([dm_task_secure_data], [], [], [#include <libdevmapper.h>])
AC_CHECK_DECLS([dm_task_retry_remove], [], [], [#include <libdevmapper.h>])
AC_CHECK_DECLS([DM_UDEV_DISABLE_DISK_RULES_FLAG], [have_cookie=yes], [have_cookie=no], [#include <libdevmapper.h>]) AC_CHECK_DECLS([DM_UDEV_DISABLE_DISK_RULES_FLAG], [have_cookie=yes], [have_cookie=no], [#include <libdevmapper.h>])
if test "x$enable_udev" = xyes; then if test "x$enable_udev" = xyes; then
if test "x$have_cookie" = xno; then if test "x$have_cookie" = xno; then
......
...@@ -295,6 +295,11 @@ static int _dm_simple(int task, const char *name, int udev_wait) ...@@ -295,6 +295,11 @@ static int _dm_simple(int task, const char *name, int udev_wait)
if (name && !dm_task_set_name(dmt, name)) if (name && !dm_task_set_name(dmt, name))
goto out; goto out;
#if HAVE_DECL_DM_TASK_RETRY_REMOVE
/* Used only in DM_DEVICE_REMOVE */
if (name && !dm_task_retry_remove(dmt))
goto out;
#endif
if (udev_wait && !_dm_task_set_cookie(dmt, &cookie, 0)) if (udev_wait && !_dm_task_set_cookie(dmt, &cookie, 0))
goto out; goto out;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment