glusterd: Fix spurious volume delete failure
If volume uses quota, volume delete operation should unmount the auxiliary quota mount usin glusterd_remove_auxiliary_mount(). This may fail with EBADF is the mount is already gone. In that situation, ignore the error so that volume delete succeeds. This fixes a spurious failure on NetBSD in tests/basic/quota.t 74-75 BUG: 1129939 Change-Id: I69325f71fc2c8af254db46f696c8669a4e6bd7e4 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9468 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
This commit is contained in:
parent
f74ff011fc
commit
27f2b8839e
@ -9942,10 +9942,15 @@ glusterd_remove_auxiliary_mount (char *volname)
|
||||
|
||||
GLUSTERD_GET_QUOTA_AUX_MOUNT_PATH (mountdir, volname, "/");
|
||||
ret = gf_umount_lazy (this->name, mountdir, 1);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
gf_log (this->name, GF_LOG_ERROR, "umount on %s failed, "
|
||||
"reason : %s", mountdir, strerror (errno));
|
||||
|
||||
/* Hide EBADF as it means the mount is already gone */
|
||||
if (errno == EBADF)
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user