Whamcloud - gitweb
Branch b1_8
authorbobijam <bobijam>
Wed, 16 Sep 2009 11:18:20 +0000 (11:18 +0000)
committerbobijam <bobijam>
Wed, 16 Sep 2009 11:18:20 +0000 (11:18 +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 6cd82ef..a927af4 100644 (file)
@@ -799,6 +799,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);