Whamcloud - gitweb
LU-4253 osc: Don't flush active extents.
[fs/lustre-release.git] / lustre / osc / osc_cache.c
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);
        default:
                break;