From 15f13cde9c34f87452e463b13b180c0a948fb8ce Mon Sep 17 00:00:00 2001 From: Ann Koehler Date: Fri, 28 Feb 2014 21:16:44 -0500 Subject: [PATCH] lustre/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 Reviewed-on: http://review.whamcloud.com/8278 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4253 Reviewed-by: Jinshan Xiong Reviewed-by: Alex Zhuravlev Reviewed-by: Alexey Lyashkov Reviewed-by: Oleg Drokin Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/osc/osc_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index b92a02efad4..af25c19c88f 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -2394,6 +2394,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; -- 2.46.0