summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/src/cli-rpc-ops.c29
-rw-r--r--cli/src/cli.h7
-rwxr-xr-xtests/basic/ec/quota.t1
-rwxr-xr-xtests/basic/quota-ancestry-building.t1
-rwxr-xr-xtests/basic/quota-anon-fd-nfs.t1
-rwxr-xr-xtests/basic/quota-nfs.t1
-rwxr-xr-xtests/basic/quota.t6
-rwxr-xr-xtests/basic/quota_aux_mount.t53
-rw-r--r--tests/bugs/cli/bug-1022905.t1
-rw-r--r--tests/bugs/distribute/bug-1099890.t1
-rwxr-xr-xtests/bugs/distribute/bug-1161156.t1
-rwxr-xr-xtests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t1
-rw-r--r--tests/bugs/glusterfs/bug-848251.t1
-rwxr-xr-xtests/bugs/posix/bug-990028.t1
-rw-r--r--tests/bugs/quota/bug-1087198.t1
-rw-r--r--tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t1
-rw-r--r--tests/volume.rc19
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c49
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c11
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c24
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h24
21 files changed, 151 insertions, 83 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 23b8fde50e9..d90395c6f76 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -3599,6 +3599,26 @@ out:
}
int
+gluster_remove_auxiliary_mount (char *volname)
+{
+ int ret = -1;
+ char mountdir[PATH_MAX] = {0,};
+ xlator_t *this = NULL;
+
+ this = THIS;
+ GF_ASSERT (this);
+
+ GLUSTERD_GET_QUOTA_LIST_MOUNT_PATH (mountdir, volname, "/");
+ ret = gf_umount_lazy (this->name, mountdir, 1);
+ if (ret) {
+ gf_log("cli", GF_LOG_ERROR, "umount on %s failed, "
+ "reason : %s", mountdir, strerror (errno));
+ }
+
+ return ret;
+}
+
+int
gf_cli_print_limit_list_from_dict (cli_local_t *local, char *volname,
dict_t *dict, char *default_sl, int count,
int op_ret, int op_errno, char *op_errstr)
@@ -3646,7 +3666,7 @@ gf_cli_print_limit_list_from_dict (cli_local_t *local, char *volname,
ret = gf_canonicalize_path (path);
if (ret)
goto out;
- GLUSTERD_GET_QUOTA_AUX_MOUNT_PATH (mountdir, volname, path);
+ GLUSTERD_GET_QUOTA_LIST_MOUNT_PATH (mountdir, volname, path);
ret = print_quota_list_from_mountdir (local, mountdir,
default_sl, path, type);
}
@@ -4131,6 +4151,7 @@ gf_cli_quota_cbk (struct rpc_req *req, struct iovec *iov,
}
xml_output:
+
if (global_state->mode & GLUSTER_MODE_XML) {
ret = cli_xml_output_str ("volQuota", NULL, rsp.op_ret,
rsp.op_errno, rsp.op_errstr);
@@ -4146,6 +4167,12 @@ xml_output:
ret = rsp.op_ret;
out:
+
+ if ((type == GF_QUOTA_OPTION_TYPE_LIST)
+ || (type == GF_QUOTA_OPTION_TYPE_LIST_OBJECTS)) {
+ gluster_remove_auxiliary_mount (volname);
+ }
+
cli_cmd_broadcast_response (ret);
if (dict)
dict_unref (dict);
diff --git a/cli/src/cli.h b/cli/src/cli.h
index 7b63e7d2804..332d3371055 100644
--- a/cli/src/cli.h
+++ b/cli/src/cli.h
@@ -62,9 +62,10 @@ typedef enum {
#define GLUSTER_MODE_WIGNORE (1 << 3)
-#define GLUSTERD_GET_QUOTA_AUX_MOUNT_PATH(abspath, volname, path) \
- snprintf (abspath, sizeof (abspath)-1, \
- DEFAULT_VAR_RUN_DIRECTORY"/%s%s", volname, path);
+#define GLUSTERD_GET_QUOTA_LIST_MOUNT_PATH(abspath, volname, path) do { \
+ snprintf (abspath, sizeof (abspath)-1, \
+ DEFAULT_VAR_RUN_DIRECTORY"/%s_quota_list%s", volname, path);\
+ } while (0)
struct cli_state;
struct cli_cmd_word;
diff --git a/tests/basic/ec/quota.t b/tests/basic/ec/quota.t
index b023240b87e..c9612c8b76a 100755
--- a/tests/basic/ec/quota.t
+++ b/tests/basic/ec/quota.t
@@ -40,7 +40,6 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "8.0MB" quotausage "/test"
TEST rm $M0/test/file2.txt
EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "0Bytes" quotausage "/test"
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
cleanup;
diff --git a/tests/basic/quota-ancestry-building.t b/tests/basic/quota-ancestry-building.t
index f8c508261f9..fcb39ee31f5 100755
--- a/tests/basic/quota-ancestry-building.t
+++ b/tests/basic/quota-ancestry-building.t
@@ -65,7 +65,6 @@ exec 5>&-
exec 6>&-
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
cleanup;
diff --git a/tests/basic/quota-anon-fd-nfs.t b/tests/basic/quota-anon-fd-nfs.t
index ebb73be966d..11fbe49c7ff 100755
--- a/tests/basic/quota-anon-fd-nfs.t
+++ b/tests/basic/quota-anon-fd-nfs.t
@@ -108,7 +108,6 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
sleep 3
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
diff --git a/tests/basic/quota-nfs.t b/tests/basic/quota-nfs.t
index 74fde400bd1..663a8da90ad 100755
--- a/tests/basic/quota-nfs.t
+++ b/tests/basic/quota-nfs.t
@@ -58,7 +58,6 @@ TEST rm -f $N0/$deep/newfile_2
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
cleanup;
diff --git a/tests/basic/quota.t b/tests/basic/quota.t
index 17d571060e1..7f8b21de6f8 100755
--- a/tests/basic/quota.t
+++ b/tests/basic/quota.t
@@ -40,12 +40,8 @@ EXPECT 'on' volinfo_field $V0 'features.quota'
EXPECT 'on' volinfo_field $V0 'features.inode-quota'
EXPECT 'on' volinfo_field $V0 'features.quota-deem-statfs'
-#Wait for the auxiliarymount to come up
-sleep 3
TEST $CLI volume quota $V0 limit-usage /test_dir 100MB
-# Checking for auxiliary mount
-EXPECT "0" get_aux
TEST $CLI volume quota $V0 limit-usage /test_dir/in_test_dir 150MB
@@ -231,9 +227,7 @@ EXPECT 'off' volinfo_field $V0 'features.quota'
EXPECT 'off' volinfo_field $V0 'features.inode-quota'
EXPECT '' volinfo_field $V0 'features.quota-deem-statfs'
-# aux mount should be removed
TEST $CLI volume stop $V0;
-EXPECT "1" get_aux
rm -f $QDD
cleanup;
diff --git a/tests/basic/quota_aux_mount.t b/tests/basic/quota_aux_mount.t
new file mode 100755
index 00000000000..78d7f47e373
--- /dev/null
+++ b/tests/basic/quota_aux_mount.t
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+
+cleanup;
+
+##-------------------------------------------------------------
+## Tests to verify that aux mount is unmounted after each quota
+## command executes.
+##-------------------------------------------------------------
+
+TEST glusterd
+TEST pidof glusterd
+TEST $CLI volume info;
+
+TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4};
+
+EXPECT "$V0" volinfo_field $V0 'Volume Name';
+EXPECT 'Created' volinfo_field $V0 'Status';
+EXPECT '4' brick_count $V0
+
+TEST $CLI volume start $V0;
+EXPECT 'Started' volinfo_field $V0 'Status';
+
+TEST $GFS -s $H0 --volfile-id $V0 $M0;
+
+TEST mkdir -p $M0/test_dir/
+
+TEST $CLI volume quota $V0 enable
+EXPECT 'on' volinfo_field $V0 'features.quota'
+EXPECT 'on' volinfo_field $V0 'features.inode-quota'
+
+TEST $CLI volume quota $V0 limit-usage /test_dir 150MB
+EXPECT "1" get_limit_aux
+TEST $CLI volume quota $V0 limit-objects /test_dir 10
+EXPECT "1" get_limit_aux
+EXPECT "150.0MB" quota_hard_limit "/test_dir";
+EXPECT "1" get_list_aux
+EXPECT "10" quota_object_hard_limit "/test_dir";
+EXPECT "1" get_list_aux
+
+TEST $CLI volume quota $V0 remove /test_dir/
+EXPECT "1" get_limit_aux
+TEST $CLI volume quota $V0 remove-objects /test_dir
+EXPECT "1" get_limit_aux
+
+TEST $CLI volume quota $V0 disable
+
+TEST $CLI volume stop $V0;
+
+cleanup;
+#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=1447344
diff --git a/tests/bugs/cli/bug-1022905.t b/tests/bugs/cli/bug-1022905.t
index 1d8981e0e9c..ee629e970d9 100644
--- a/tests/bugs/cli/bug-1022905.t
+++ b/tests/bugs/cli/bug-1022905.t
@@ -32,7 +32,6 @@ TEST $CLI volume set $V0 diagnostics.client-log-level DEBUG
TEST $CLI volume reset $V0 force;
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
TEST $CLI volume delete $V0
cleanup;
diff --git a/tests/bugs/distribute/bug-1099890.t b/tests/bugs/distribute/bug-1099890.t
index 40f70d4938b..1a19ba880c0 100644
--- a/tests/bugs/distribute/bug-1099890.t
+++ b/tests/bugs/distribute/bug-1099890.t
@@ -123,7 +123,6 @@ EXPECT "1" is_dht_linkfile "$B0/${V0}1/zz"
force_umount $M0
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
UMOUNT_LOOP ${B0}/${V0}{1,2}
rm -f ${B0}/brick{1,2}
diff --git a/tests/bugs/distribute/bug-1161156.t b/tests/bugs/distribute/bug-1161156.t
index 44a234c60dc..fed90e7f478 100755
--- a/tests/bugs/distribute/bug-1161156.t
+++ b/tests/bugs/distribute/bug-1161156.t
@@ -50,7 +50,6 @@ TEST ! mv $N0/dir/newfile_3 $N0/newdir/
umount_nfs $N0
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
diff --git a/tests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t b/tests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t
index 9fe55a3d9df..de48c091c7e 100755
--- a/tests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t
+++ b/tests/bugs/glusterd/bug-765230-remove-quota-related-option-after-disabling-quota.t
@@ -54,7 +54,6 @@ EXPECT '' volinfo_field $V0 'features.quota-deem-statfs'
## Finish up
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
EXPECT 'Stopped' volinfo_field $V0 'Status';
TEST $CLI volume delete $V0;
diff --git a/tests/bugs/glusterfs/bug-848251.t b/tests/bugs/glusterfs/bug-848251.t
index ed3caa34b01..69ffe680f7f 100644
--- a/tests/bugs/glusterfs/bug-848251.t
+++ b/tests/bugs/glusterfs/bug-848251.t
@@ -48,6 +48,5 @@ EXPECT "80%" quota_list
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $MOUNTDIR
TEST rm -rf $MOUNTDIR
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
cleanup;
diff --git a/tests/bugs/posix/bug-990028.t b/tests/bugs/posix/bug-990028.t
index d04bb2b4af1..c86421492cd 100755
--- a/tests/bugs/posix/bug-990028.t
+++ b/tests/bugs/posix/bug-990028.t
@@ -153,6 +153,5 @@ __init;
links_in_same_directory;
links_across_directories;
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
cleanup
diff --git a/tests/bugs/quota/bug-1087198.t b/tests/bugs/quota/bug-1087198.t
index 0694b251d9f..95133085f13 100644
--- a/tests/bugs/quota/bug-1087198.t
+++ b/tests/bugs/quota/bug-1087198.t
@@ -78,7 +78,6 @@ TEST grep -e "\"Usage is above soft limit:.*used by /\"" -- $BRICK_LOG_DIR/*
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $N0
TEST $CLI volume stop $V0
-EXPECT "1" get_aux
rm -f $QDD
diff --git a/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t b/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t
index 366937245f2..addc05917d8 100644
--- a/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t
+++ b/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t
@@ -27,7 +27,6 @@ EXPECT '1' get_snap_count CLI_1 $V0
TEST $CLI_1 volume stop $V0
EXPECT 'Stopped' volinfo_field $V0 'Status'
-EXPECT "1" get_aux
TEST $CLI_1 snapshot restore $($CLI_1 snapshot list)
EXPECT '0' get_snap_count CLI_1 $V0
diff --git a/tests/volume.rc b/tests/volume.rc
index 5419e399d8f..5c53bba2efd 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -615,8 +615,9 @@ function num_graphs
function get_aux()
{
##Check if a auxiliary mount is there
+local aux_suffix=$1
local rundir=$(gluster --print-statedumpdir)
-local pidfile="${rundir}/${V0}.pid"
+local pidfile="${rundir}/${V0}$aux_suffix.pid"
if [ -f $pidfile ];
then
local pid=$(cat ${rundir}/${V0}.pid)
@@ -633,6 +634,18 @@ else
fi
}
+function get_list_aux()
+{
+# check for quota list aux mount
+ get_aux "_quota_list"
+}
+
+function get_limit_aux()
+{
+# check for quota list aux mount
+ get_aux "_quota_limit"
+}
+
function check_for_xattr {
local xattr=$1
local filepath=$2
@@ -717,6 +730,10 @@ function quota_hl_exceeded()
}
+function quota_object_hard_limit()
+{
+ quota_object_list_field $1 2
+}
function scrub_status()
{
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index 1e62c9dfdeb..fc34042a8a7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -709,11 +709,6 @@ glusterd_quota_disable (glusterd_volinfo_t *volinfo, char **op_errstr,
}
}
- //Remove aux mount of the volume on every node in the cluster
- ret = glusterd_remove_auxiliary_mount (volinfo->volname);
- if (ret)
- goto out;
-
*crawl = _gf_true;
(void) glusterd_clean_up_quota_store (volinfo);
@@ -743,7 +738,7 @@ glusterd_set_quota_limit (char *volname, char *path, char *hard_limit,
priv = this->private;
GF_ASSERT (priv);
- GLUSTERD_GET_QUOTA_AUX_MOUNT_PATH (abspath, volname, path);
+ GLUSTERD_GET_QUOTA_LIMIT_MOUNT_PATH (abspath, volname, path);
ret = gf_lstat_dir (abspath, NULL);
if (ret) {
gf_asprintf (op_errstr, "Failed to find the directory %s. "
@@ -1373,7 +1368,7 @@ glusterd_remove_quota_limit (char *volname, char *path, char **op_errstr,
priv = this->private;
GF_ASSERT (priv);
- GLUSTERD_GET_QUOTA_AUX_MOUNT_PATH (abspath, volname, path);
+ GLUSTERD_GET_QUOTA_LIMIT_MOUNT_PATH (abspath, volname, path);
ret = gf_lstat_dir (abspath, NULL);
if (ret) {
gf_asprintf (op_errstr, "Failed to find the directory %s. "
@@ -1704,6 +1699,16 @@ glusterd_op_quota (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
ret = 0;
out:
+ if (type == GF_QUOTA_OPTION_TYPE_LIMIT_USAGE ||
+ type == GF_QUOTA_OPTION_TYPE_LIMIT_OBJECTS ||
+ type == GF_QUOTA_OPTION_TYPE_REMOVE ||
+ type == GF_QUOTA_OPTION_TYPE_REMOVE_OBJECTS) {
+ /* During a list operation we need the aux mount to be
+ * accessible until the listing is done at the cli
+ */
+ glusterd_remove_auxiliary_mount (volinfo->volname);
+ }
+
return ret;
}
@@ -1862,7 +1867,7 @@ out:
}
static int
-glusterd_create_quota_auxiliary_mount (xlator_t *this, char *volname)
+glusterd_create_quota_auxiliary_mount (xlator_t *this, char *volname, int type)
{
int ret = -1;
char mountdir[PATH_MAX] = {0,};
@@ -1872,28 +1877,30 @@ glusterd_create_quota_auxiliary_mount (xlator_t *this, char *volname)
char *volfileserver = NULL;
glusterd_conf_t *priv = NULL;
struct stat buf = {0,};
+ FILE *file = NULL;
GF_VALIDATE_OR_GOTO ("glusterd", this, out);
priv = this->private;
GF_VALIDATE_OR_GOTO (this->name, priv, out);
- GLUSTERFS_GET_AUX_MOUNT_PIDFILE (pidfile_path, volname);
- if (gf_is_service_running (pidfile_path, NULL)) {
- gf_msg_debug (this->name, 0, "Aux mount of volume %s is running"
- " already", volname);
- ret = 0;
- goto out;
+ if (type == GF_QUOTA_OPTION_TYPE_LIST ||
+ type == GF_QUOTA_OPTION_TYPE_LIST_OBJECTS) {
+ GLUSTERFS_GET_QUOTA_LIST_MOUNT_PIDFILE (pidfile_path, volname);
+ GLUSTERD_GET_QUOTA_LIST_MOUNT_PATH (mountdir, volname, "/");
+ } else {
+ GLUSTERFS_GET_QUOTA_LIMIT_MOUNT_PIDFILE (pidfile_path, volname);
+ GLUSTERD_GET_QUOTA_LIMIT_MOUNT_PATH (mountdir, volname, "/");
}
- if (glusterd_is_fuse_available () == _gf_false) {
- gf_msg (this->name, GF_LOG_ERROR, 0,
- GD_MSG_MOUNT_REQ_FAIL, "Fuse unavailable");
- ret = -1;
- goto out;
+ file = fopen (pidfile_path, "r");
+ if (file) {
+ /* Previous command did not clean up pid file.
+ * remove aux mount if it exists*/
+ gf_umount_lazy (this->name, mountdir, 1);
+ fclose(file);
}
- GLUSTERD_GET_QUOTA_AUX_MOUNT_PATH (mountdir, volname, "/");
ret = sys_mkdir (mountdir, 0777);
if (ret && errno != EEXIST) {
gf_msg (this->name, GF_LOG_ERROR, errno,
@@ -2047,7 +2054,7 @@ glusterd_op_stage_quota (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
*/
if (is_origin_glusterd (dict)) {
ret = glusterd_create_quota_auxiliary_mount (this,
- volname);
+ volname, type);
if (ret) {
*op_errstr = gf_strdup ("Failed to start aux "
"mount");
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index e00d9a12fa5..7e6e6d41127 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -11547,21 +11547,12 @@ glusterd_remove_auxiliary_mount (char *volname)
{
int ret = -1;
char mountdir[PATH_MAX] = {0,};
- char pidfile[PATH_MAX] = {0,};
xlator_t *this = NULL;
this = THIS;
GF_ASSERT (this);
- GLUSTERFS_GET_AUX_MOUNT_PIDFILE (pidfile, volname);
-
- if (!gf_is_service_running (pidfile, NULL)) {
- gf_msg_debug (this->name, 0, "Aux mount of volume %s "
- "absent, hence returning", volname);
- return 0;
- }
-
- GLUSTERD_GET_QUOTA_AUX_MOUNT_PATH (mountdir, volname, "/");
+ GLUSTERD_GET_QUOTA_LIMIT_MOUNT_PATH (mountdir, volname, "/");
ret = gf_umount_lazy (this->name, mountdir, 1);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, errno,
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index 6bb81c14d89..4738dc589d5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -2648,8 +2648,6 @@ glusterd_stop_volume (glusterd_volinfo_t *volinfo)
{
int ret = -1;
glusterd_brickinfo_t *brickinfo = NULL;
- char mountdir[PATH_MAX] = {0,};
- char pidfile[PATH_MAX] = {0,};
xlator_t *this = NULL;
glusterd_svc_t *svc = NULL;
@@ -2678,24 +2676,6 @@ glusterd_stop_volume (glusterd_volinfo_t *volinfo)
goto out;
}
- /* If quota auxiliary mount is present, unmount it */
- GLUSTERFS_GET_AUX_MOUNT_PIDFILE (pidfile, volinfo->volname);
-
- if (!gf_is_service_running (pidfile, NULL)) {
- gf_msg_debug (this->name, 0, "Aux mount of volume %s "
- "absent", volinfo->volname);
- } else {
- GLUSTERD_GET_QUOTA_AUX_MOUNT_PATH (mountdir, volinfo->volname,
- "/");
-
- ret = gf_umount_lazy (this->name, mountdir, 0);
- if (ret)
- gf_msg (this->name, GF_LOG_ERROR, errno,
- GD_MSG_UNOUNT_FAILED,
- "umount on %s failed",
- mountdir);
- }
-
if (!volinfo->is_snap_volume) {
svc = &(volinfo->snapd.svc);
ret = svc->manager (svc, volinfo, PROC_START_NO_WAIT);
@@ -2784,10 +2764,6 @@ glusterd_op_delete_volume (dict_t *dict)
goto out;
}
- ret = glusterd_remove_auxiliary_mount (volname);
- if (ret)
- goto out;
-
ret = glusterd_delete_volume (volinfo);
out:
gf_msg_debug (this->name, 0, "returning %d", ret);
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 55879aa22de..5d16b81bb6c 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -620,9 +620,15 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args);
#define GLUSTERD_GET_QUOTAD_DIR(path, priv) \
snprintf (path, PATH_MAX, "%s/quotad", priv->workdir);
-#define GLUSTERD_GET_QUOTA_AUX_MOUNT_PATH(abspath, volname, path) \
- snprintf (abspath, sizeof (abspath)-1, \
- DEFAULT_VAR_RUN_DIRECTORY"/%s%s", volname, path);
+#define GLUSTERD_GET_QUOTA_LIMIT_MOUNT_PATH(abspath, volname, path) do { \
+ snprintf (abspath, sizeof (abspath)-1, \
+ DEFAULT_VAR_RUN_DIRECTORY"/%s_quota_limit%s", volname, path);\
+ } while (0)
+
+#define GLUSTERD_GET_QUOTA_LIST_MOUNT_PATH(abspath, volname, path) do { \
+ snprintf (abspath, sizeof (abspath)-1, \
+ DEFAULT_VAR_RUN_DIRECTORY"/%s_quota_list%s", volname, path);\
+ } while (0)
#define GLUSTERD_GET_TMP_PATH(abspath, path) do { \
snprintf (abspath, sizeof (abspath)-1, \
@@ -711,11 +717,19 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args);
uuid_utoa(MY_UUID)); \
} while (0)
-#define GLUSTERFS_GET_AUX_MOUNT_PIDFILE(pidfile, volname) { \
+#define GLUSTERFS_GET_QUOTA_LIMIT_MOUNT_PIDFILE(pidfile, volname) { \
snprintf (pidfile, PATH_MAX-1, \
- DEFAULT_VAR_RUN_DIRECTORY"/%s.pid", volname); \
+ DEFAULT_VAR_RUN_DIRECTORY"/%s_quota_limit.pid", \
+ volname); \
}
+#define GLUSTERFS_GET_QUOTA_LIST_MOUNT_PIDFILE(pidfile, volname) { \
+ snprintf (pidfile, PATH_MAX-1, \
+ DEFAULT_VAR_RUN_DIRECTORY"/%s_quota_list.pid", \
+ volname); \
+ }
+
+
#define GLUSTERD_GET_UUID_NOHYPHEN(ret_string, uuid) do { \
char *snap_volname_ptr = ret_string; \
char tmp_uuid[64]; \