|
|
74096c |
From d54f087a2484695ff7ac214d39f2750fddcef2d5 Mon Sep 17 00:00:00 2001
|
|
|
74096c |
From: HuangShujun <549702281@qq.com>
|
|
|
74096c |
Date: Thu, 5 Dec 2019 10:07:10 +0200
|
|
|
74096c |
Subject: [PATCH 387/449] To fix readdir-ahead memory leak
|
|
|
74096c |
|
|
|
74096c |
Glusterfs client process has memory leak if create several files under
|
|
|
74096c |
one folder, and delete the folder. According to statedump, the ref
|
|
|
74096c |
counts of readdir-ahead is bigger than zero in the inode table.
|
|
|
74096c |
|
|
|
74096c |
Readdir-ahead get parent inode by inode_parent in rda_mark_inode_dirty
|
|
|
74096c |
when each rda_writev_cbk,the inode ref count of parent folder will be
|
|
|
74096c |
increased in inode_parent, but readdir-ahead do not unref it later.
|
|
|
74096c |
|
|
|
74096c |
The correction is unref the parent inode at the end of
|
|
|
74096c |
rda_mark_inode_dirty.
|
|
|
74096c |
|
|
|
74096c |
Upstream patch:
|
|
|
74096c |
> Upstream patch link: https://review.gluster.org/c/glusterfs/+/23815
|
|
|
74096c |
> Fixes: bz#1779055
|
|
|
74096c |
> Signed-off-by: HuangShujun <549702281@qq.com>
|
|
|
74096c |
> Change-Id: Iee68ab1089cbc2fbc4185b93720fb1f66ee89524
|
|
|
74096c |
|
|
|
74096c |
BUG: 1781550
|
|
|
74096c |
Change-Id: Iee68ab1089cbc2fbc4185b93720fb1f66ee89524
|
|
|
74096c |
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
74096c |
Reviewed-on: https://code.engineering.redhat.com/gerrit/202312
|
|
|
74096c |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
74096c |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
74096c |
---
|
|
|
74096c |
xlators/performance/readdir-ahead/src/readdir-ahead.c | 1 +
|
|
|
74096c |
1 file changed, 1 insertion(+)
|
|
|
74096c |
|
|
|
74096c |
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
|
|
|
74096c |
index 7fd4f8d..933941d 100644
|
|
|
74096c |
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
|
|
|
74096c |
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
|
|
|
74096c |
@@ -254,6 +254,7 @@ rda_mark_inode_dirty(xlator_t *this, inode_t *inode)
|
|
|
74096c |
}
|
|
|
74096c |
}
|
|
|
74096c |
UNLOCK(&parent->lock);
|
|
|
74096c |
+ inode_unref(parent);
|
|
|
74096c |
}
|
|
|
74096c |
|
|
|
74096c |
return;
|
|
|
74096c |
--
|
|
|
74096c |
1.8.3.1
|
|
|
74096c |
|