]> git.ipfire.org Git - thirdparty/libvirt.git/commit
sanlock: Use VIR_ERR_RESOURCE_BUSY if sanlock_acquire fails
authorJiri Denemark <jdenemar@redhat.com>
Tue, 14 Apr 2015 14:27:37 +0000 (16:27 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 15 Apr 2015 07:40:42 +0000 (09:40 +0200)
commit4864e377c9a6ef08cd65672775e520751a27f6d7
tree21acd446222f032da75233f65c923d5b53c4bdf6
parent58dfc5341432e5b510c441457a524b9d818ad63c
sanlock: Use VIR_ERR_RESOURCE_BUSY if sanlock_acquire fails

When acquiring resource via sanlock fails, we would report it as
VIR_ERR_INTERNAL_ERROR, which is not very friendly to applications using
libvirt. Moreover, the lockd driver would report the same failure as
VIR_ERR_RESOURCE_BUSY, which looks better.

Unfortunately, in sanlock driver we don't really know if acquiring the
resource failed because it was already locked or there was another
reason behind. But the end result is the same and I think using
VIR_ERR_RESOURCE_BUSY reason for all acquire failures is still better
than what we have now.

https://bugzilla.redhat.com/show_bug.cgi?id=1165119
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/locking/lock_driver_sanlock.c
src/util/virerror.c