Ok, lets just fix filemap_fdatasync. We can tackle the msync/fsync
interaction with screwed up FS writepages later, since all of the existing
writepage funcs are safe. The problems I see with filemap_fdatasync when
writepage returns 1:
The page dirty bit is not reset.
the page is never unlocked.
So how about something like this in filemap_fdatasync
ret = writepage(page) ;
if (ret == 1) {
/* writepage declined to write it out,
** leave it on the locked list, but make
** sure the dirty bit stays on so the page
** doesn't disappear
*/
SetPageDirty(page) ;
UnlockPage(page) ;
}
And then, in filemap_fdatawait:
list_del(&page->list) ;
if (PageDirty(page))
list_add(&page->list, &mapping->dirty_pages) ;
else
list_add(&page->list, &mapping->clean_pages) ;
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Jan 07 2001 - 21:00:18 EST