Whamcloud - gitweb
LU-4253 osc: Don't flush active extents. 78/8278/2
authorAnn Koehler <amk@cray.com>
Thu, 14 Nov 2013 22:02:15 +0000 (16:02 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 6 Dec 2013 06:32:42 +0000 (06:32 +0000)
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 <amk@cray.com>
Change-Id: Iba646d8185b12ab227fe0bbee1c6602ccdc32ad6
Reviewed-on: http://review.whamcloud.com/8278
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>

index 3dbb375..5c25dfd 100644 (file)
@@ -2555,6 +2555,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);