Bug in block_write_full_page (fs/buffer.c)?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
when block_write_full_page (fs/buffer.c) is called and the page is fully outside the i_size, the function does not call end_page_writeback() even though Documentation/filesystems/Locking explicitly says that any implementation of aops->writepage must do so in any case.
"If no I/O is submitted, the filesystem must run end_page_writeback() against the page before returning from writepage."
Is this a bug, is the documentation wrong or is it just me?
TIA,
Martin Jambor
Hi,
Quoted 10 lines · Martin Jambor
when
block_write_full_page(fs/buffer.c) is called and the page is fully outside thei_size, the function does not callend_page_writeback()even thoughDocumentation/filesystems/Lockingexplicitly says that any implementation ofaops->writepagemust do so in any case."If no I/O is submitted, the filesystem must run
end_page_writeback()against the page before returning from writepage."Is this a bug, is the documentation wrong or is it just me?
Just you. (-;
The sentence you quote applies only once set_page_writeback() has been run which it hasn't in this case.
But this is beside the point. The point is that the code path you are concerned about calls block_invalidatepage() which ends up calling clear_page_dirty() for the kind of page we are discussing which in turn clears the radix tree dirty tag so all is dandy.
Best regards,
Anton
Signature · 4 lines
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/