From 8dbece04f982cc6ceefb8eb4c39dbfd6d3620d49 Mon Sep 17 00:00:00 2001 From: bobijam Date: Wed, 16 Sep 2009 11:18:20 +0000 Subject: [PATCH] Branch b1_8 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c index 6cd82ef..a927af4 100644 --- a/lustre/obdfilter/filter_io_26.c +++ b/lustre/obdfilter/filter_io_26.c @@ -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); -- 1.8.3.1