[lkml]   [2001]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] filemap_fdatasync & related changes
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) ;
list_add(&page->list, &mapping->clean_pages) ;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.086 / U:2.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site