From c2865e83d414e375443adac0791887c8adf444f2 Mon Sep 17 00:00:00 2001 From: vmallika Date: Sat, 2 Apr 2016 09:50:11 +0530 Subject: quota/glusterd: enhance quota enable and disable process Previously quota crawl was done from the single mount point, this is very slow process if there are huge number of files exists in the volume This RFE will now spawn crawl process for each brick in the volume, and files are looked in parallel independently for each brick. This improves the speed of crawling process for entire files-system This patch also fixes below problem * Previously, mountdir was created under '/tmp'. If someone tries to cleanup '/tmp'/ directory then it is very dangerous that we loose volume data So create a mount point under /var/run/gluster/tmp instead * Previously, file-system crawl is performed from all the nodes, which is a redundant operation and performance will degrade The problem is fixed with this patch Change-Id: Icabedeb44182139ace9c8106793803122388cab8 BUG: 1290766 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/12952 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Manikandan Selvaganesh Reviewed-by: Atin Mukherjee --- tests/bugs/quota/bug-1293601.t | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests/bugs/quota/bug-1293601.t') diff --git a/tests/bugs/quota/bug-1293601.t b/tests/bugs/quota/bug-1293601.t index 04c350e688d..52b03bcc059 100644 --- a/tests/bugs/quota/bug-1293601.t +++ b/tests/bugs/quota/bug-1293601.t @@ -4,19 +4,22 @@ . $(dirname $0)/../../volume.rc cleanup; -TESTS_EXPECTED_IN_LOOP=1024 TEST glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4} TEST $CLI volume start $V0 TEST $CLI volume quota $V0 enable -TEST $CLI volume quota $V0 limit-usage / 2MB TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0; -for i in {1..1024}; do - TEST_IN_LOOP dd if=/dev/zero of=$M0/f$i bs=1k count=1 +for i in {1..512}; do + dd if=/dev/zero of=$M0/f$i bs=1k count=1 +done + +mkdir $M0/dir1 +for i in {513..1024}; do + dd if=/dev/zero of=$M0/dir1/f$i bs=1k count=1 done EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "1.0MB" quotausage "/" @@ -24,7 +27,6 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "1.0MB" quotausage "/" TEST $CLI volume quota $V0 disable TEST $CLI volume quota $V0 enable -TEST $CLI volume quota $V0 limit-usage / 2MB EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "1.0MB" quotausage "/" cleanup; -- cgit