From: zab Date: Tue, 11 Mar 2003 02:34:52 +0000 (+0000) Subject: - purge the write cache before truncate stomps on the local i_size so that we X-Git-Tag: v1_7_100~1^100~45 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=62c07eabb8b495e2a34b00ad1925189677c8cecf;p=fs%2Flustre-release.git - purge the write cache before truncate stomps on the local i_size so that we don't zero-extend the file when truncate's lock acquisition purges the writeback after having updated the i_size. I'm not sure how 2.5 will do this, but it probably needs to. --- diff --git a/lustre/llite/iod.c b/lustre/llite/iod.c index 57ad39a..3a045f4 100644 --- a/lustre/llite/iod.c +++ b/lustre/llite/iod.c @@ -140,8 +140,9 @@ static int llwp_consume_page(struct ll_writeback_pages *llwp, */ LASSERT(pg->count >= 0); - CDEBUG(D_CACHE, "brw_page %p: off "LPU64" cnt %d, page %p: ind %ld\n", - pg, pg->off, pg->count, page, page->index); + CDEBUG(D_CACHE, "brw_page %p: off "LPU64" cnt %d, page %p: ind %ld" + " i_size: "LPU64"\n", pg, pg->off, pg->count, page, + page->index, inode->i_size); if ( llwp->num_frags == 3 || llwp->num_pages == LLWP_MAX_PAGES ) return -1;