[Devel] [PATCH RHEL7 COMMIT] ms/xfs: fix dquot isolation hang
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Dec 25 01:48:41 PST 2015
The commit is pushed to "temp1" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.3.1.el7
------>
commit f45a7773669121cacfd28a9081f0d68b80a99de3
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date: Fri Dec 25 13:48:41 2015 +0400
ms/xfs: fix dquot isolation hang
Patch series description:
https://jira.sw.ru/browse/PSBM-42319
Andrew Morton (1):
xfs-convert-dquot-cache-lru-to-list_lru-fix
Dave Chinner (2):
xfs: convert dquot cache lru to list_lru
xfs: fix dquot isolation hang
Vladimir Davydov (3):
xfs_qm: lost hunk from "ms/list_lru: dynamically adjust node arrays"
xfs_qm: lost hunk from "ms/list_lru: introduce
list_lru_shrink_{count,walk}"
xfs_qm: lost hunk from "ms/list_lru: add helpers to isolate items"
================================
This patch description:
From: Dave Chinner <david at fromorbit.com>
The new LRU list isolation code in xfs_qm_dquot_isolate() isn't
completely up to date. Firstly, it needs conversion to return enum
lru_status values, not raw numbers. Secondly - most importantly - it
fails to unlock the dquot and relock the LRU in the LRU_RETRY path.
This leads to deadlocks in xfstests generic/232. Fix them.
Signed-off-by: Dave Chinner <dchinner at redhat.com>
Cc: Glauber Costa <glommer at gmail.com>
Cc: Michal Hocko <mhocko at suse.cz>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Al Viro <viro at zeniv.linux.org.uk>
(cherry picked from commit 35163417fb7a55a24b6b0ebb102e9991adf309aa)
Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
fs/xfs/xfs_qm.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index edf2349..1a454d1 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -451,7 +451,7 @@ xfs_qm_dquot_isolate(
trace_xfs_dqreclaim_want(dqp);
list_del_init(&dqp->q_lru);
XFS_STATS_DEC(xs_qm_dquot_unused);
- return 0;
+ return LRU_REMOVED;
}
/*
@@ -497,17 +497,19 @@ xfs_qm_dquot_isolate(
XFS_STATS_DEC(xs_qm_dquot_unused);
trace_xfs_dqreclaim_done(dqp);
XFS_STATS_INC(xs_qm_dqreclaims);
- return 0;
+ return LRU_REMOVED;
out_miss_busy:
trace_xfs_dqreclaim_busy(dqp);
XFS_STATS_INC(xs_qm_dqreclaim_misses);
- return 2;
+ return LRU_SKIP;
out_unlock_dirty:
trace_xfs_dqreclaim_busy(dqp);
XFS_STATS_INC(xs_qm_dqreclaim_misses);
- return 3;
+ xfs_dqunlock(dqp);
+ spin_lock(lru_lock);
+ return LRU_RETRY;
}
static unsigned long
More information about the Devel
mailing list