diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 569729e322cda6b0c164a7032d51490c1d058166..58558797de505c6b3c37eb8ff3513a04c6f8c221 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -24,6 +24,13 @@ tbd Sun Microsystems, Inc. 'tunefs.lustre --param="mdt.quota_type=ug1" $MDTDEV'. For more information, please refer to bugzilla 13904. +Severity : normal +Bugzilla : 15443 +Description: wait until IO finished before start new when do lock cancel. +Details : VM protocol want old IO finished before start new, in this case + need wait until PG_writeback is cleared until check dirty flag and + call writepages in lock cancel callback. + Severity : normal Bugzilla : 12888 Description: mds_mfd_close() ASSERTION(rc == 0) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index d49116fc2529af156f709d1e35e504b98cb5d7ba..bb95f2740c5528f2bdb0fc1b4d7efeff509d655f 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -713,17 +713,18 @@ int ll_page_removal_cb(void *data, int discard) ll_teardown_mmaps(mapping, (__u64)page->index << PAGE_CACHE_SHIFT, ((__u64)page->index<<PAGE_CACHE_SHIFT)| - ~PAGE_CACHE_MASK); + ~PAGE_CACHE_MASK); LL_CDEBUG_PAGE(D_PAGE, page, "removing page\n"); + if (!discard && PageWriteback(page)) + wait_on_page_writeback(page); if (!discard && clear_page_dirty_for_io(page)) { - LASSERT(page->mapping); rc = ll_call_writepage(page->mapping->host, page); /* either waiting for io to complete or reacquiring * the lock that the failed writepage released */ lock_page(page); wait_on_page_writeback(page); - if (rc != 0) { + if (rc < 0) { CERROR("writepage inode %lu(%p) of page %p " "failed: %d\n", mapping->host->i_ino, mapping->host, page, rc);