diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2015-01-21 06:24:47 +0100 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-01-21 22:41:30 -0800 |
commit | 27f2b8839e4d3ebe9ccbde071864b3e8016a3c4d (patch) | |
tree | 9a6d85daa61bb270e5bdcae6d9f8da5294b32d5b /xlators/mgmt/glusterd/src | |
parent | f74ff011fce5959884a4f47f0c87ae8795d64a24 (diff) |
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>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 7 |
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 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; } |