Whamcloud - gitweb
ranch b_release_1_8_1
authorbobijam <bobijam>
Wed, 16 Sep 2009 11:21:23 +0000 (11:21 +0000)
committerbobijam <bobijam>
Wed, 16 Sep 2009 11:21:23 +0000 (11:21 +0000)
b=20560
o=johann
i=alex.zhuravlev
i=zhenyu.xu (bobijam)

Discard pages if somehting failed after filter_preprw_write().

lustre/obdfilter/filter_io_26.c

index 7b428f9..977f70c 100644 (file)
@@ -792,6 +792,13 @@ cleanup:
                 if (lnb->page == NULL)
                         continue;
 
+                if (rc)
+                        /* If the write has failed, the page cache may
+                         * not be consitent with what is on disk, so
+                         * force pages to be reread next time it is
+                         * accessed */
+                        ClearPageUptodate(lnb->page);
+
                 LASSERT(PageLocked(lnb->page));
                 unlock_page(lnb->page);