Re: 2.6.6-rc{1,2} bad VM/NFS interaction in case of dirty page writeback

Andrew Morton
2004-04-28T20:00:15Z

Christoph Hellwig <hch@infradead.org> wrote:
>
> I'm not yet sure where I'm heading with revamping xfs_aops.c, but what
> I'd love to see in the end is more or less xfs implementing only
> writepages and some generic implement writepage as writepages wrapper.

That might make sense. One problem is that writepage expects to be passed
a locked page whereas writepages() does not.

Any code which implements writearound-inside-writepage should be targetted
at a generic implementation, not an fs-specific one if poss. We could go
look at the ->vm_writeback() a_op which was in in 2.5.20 or thereabouts.
it was causing problems and had no discernable benefits so I ripped it out.

A writearound-within-writepage implementation would need to decide whether
it's goign to use lock_page() or TryLockPage(). I expect lock_page() will
be OK - we only call in there for __GFP_FS allocators.