From 668bb793470eb1bb554feb52a454a93009483196 Mon Sep 17 00:00:00 2001 From: Ann Koehler Date: Thu, 14 Nov 2013 16:02:15 -0600 Subject: [PATCH] LU-4253 osc: Don't flush active extents. The extent is active so we need to abort and let the caller re-dirty the page. If we continued on here, and we were the one making the extent active, we could deadlock waiting for the page writeback to clear but it won't because the extent is active and won't be written out. Signed-off-by: Ann Koehler Change-Id: Iba646d8185b12ab227fe0bbee1c6602ccdc32ad6 Reviewed-on: http://review.whamcloud.com/8278 Tested-by: Jenkins Reviewed-by: Jinshan Xiong Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Alexey Lyashkov Reviewed-by: Oleg Drokin --- lustre/osc/osc_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index 1096d03..9352bf1 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -2460,6 +2460,12 @@ int osc_flush_async_page(const struct lu_env *env, struct cl_io *io, * really sending the RPC. */ case OES_TRUNC: /* race with truncate, page will be redirtied */ + case OES_ACTIVE: + /* The extent is active so we need to abort and let the caller + * re-dirty the page. If we continued on here, and we were the + * one making the extent active, we could deadlock waiting for + * the page writeback to clear but it won't because the extent + * is active and won't be written out. */ GOTO(out, rc = -EAGAIN); default: break; -- 1.8.3.1