Discussion:
[linux-lvm] bug in lvmlockd
Andrey Staselko
2016-01-27 15:25:49 UTC
Permalink
If lvm configured with --enable-lockd-dlm and without --enable-lockd-sanlock,
then "lvmlockd --adopt 1" always produces error "adopt_locks failed, reset host" in adopt_locks().

lm_get_lockspaces_sanlock() stub in daemons/lvmlockd/lvmlockd-internal.h line 577 returns -1,
that breaks the adopt_locks() function in daemons/lvmlockd/lvmlockd-core.c line 5160:

rv = lm_get_lockspaces_sanlock(&ls_found);
if ((rv < 0) && (rv != -ECONNREFUSED))
goto fail;

AS
David Teigland
2016-01-28 15:52:51 UTC
Permalink
Post by Andrey Staselko
If lvm configured with --enable-lockd-dlm and without --enable-lockd-sanlock,
then "lvmlockd --adopt 1" always produces error "adopt_locks failed, reset host" in adopt_locks().
Thanks, I've fixed that. (Also, I'm not sure it's mentioned anywhere that
git.kernel.org/torvalds/c/2ab4bd8 is needed for dlm lock adoption to work.)

Dave

Loading...