summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2015-01-23 11:28:50 +0100
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-02-11 03:45:36 -0800
commite312b0807b51120942d95d482ddce7a51ebbacc8 (patch)
tree7c3fbd4428a0aba36cc571b6d50b23b08703f2aa
parent098d823dd771115be5ebbdc4e14ae68451da7f6a (diff)
glusterd: Fix spurious volume delete failurev3.6.3beta1
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 Backport of I69325f71fc2c8af254db46f696c8669a4e6bd7e4 BUG: 1138897 Change-Id: If0d382d44a956bb9fd8c41299f82affdf2ee0618 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9484 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 16bf424..dba22fd 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -12033,10 +12033,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;
}