While investigating other sendfile issues with I/O error handling,
I noticed that if an async I/O from sendfile fails, then the sendfile code
would avoid sending the stale to the socket, but the pages which could not
be read were still marked valid and left in memory, and then the stale contents
of these pages can be accessed by any normal method such as read().
vnode_pager_generic_getpages_done() indeed marks the pages valid
without checking for errors, so this patch just skips marking the pages
valid if the I/O failed. Future attempts to access such pages will
notice that they are not marked valid and try to read them from disk again.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/vm/vnode_pager.c | ||
---|---|---|
1174 ↗ | (On Diff #72692) | I believe some lines become too long after one more level of indent there. |