Skip to contentSkip to conversation

Bug in block_write_full_page (fs/buffer.c)?

DISCUSSION Martin Jambor 2 participants 2 messages Jun 6, 2005 1 message not in the archive VFS

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

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

#2 lore raw

Hi,

Quoted 10 lines · Martin Jambor

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?

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/