Re: [PATCH] filemap_fdatasync & related changes

Linus Torvalds (torvalds@transmeta.com)
Thu, 4 Jan 2001 10:00:42 -0800 (PST)


On Thu, 4 Jan 2001, Chris Mason wrote:
>
> The page dirty bit is not reset.
> the page is never unlocked.
>
> So how about something like this in filemap_fdatasync

I'd rather just change the rule that "writepage()" will clear the dirty
bit itself and always unlock (and "1" just to inform the upper layers that
the page cannot be thrown away).

> 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) ;

Can't be done. The thing depends on the fact that it always depletes the
dirty list. The whole fdatasync() logic hinges on the fact that it will
always move pages "down" - otherwise it will never complete.

Linus

-
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/