From 27f2b8839e4d3ebe9ccbde071864b3e8016a3c4d Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Wed, 21 Jan 2015 06:24:47 +0100 Subject: 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 Reviewed-on: http://review.gluster.org/9468 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-utils.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 5c2d6f23309..e1b0681c29a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -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; } -- cgit