mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
e00e99ba6c
When a folio that is marked for streaming write (dirty, but not uptodate,
with partial content specified in the private data) is written back, the
folio is effectively switched to the blank state upon completion of the
write. This means that if we want to read it in future, we need to reread
the whole folio.
However, if the folio is above the zero_point position, when it is read
back, it will just be cleared and the read skipped, leading to apparent
local corruption.
Fix this by increasing the zero_point to the end of the dirty data in the
folio when clearing the folio state after writeback. This is analogous to
the folio having ->release_folio() called upon it.
This was causing the config.log generated by configuring a cpython tree on
a cifs share to get corrupted because the scripts involved were appending
text to the file in small pieces.
Fixes:
|
||
---|---|---|
.. | ||
buffered_read.c | ||
buffered_write.c | ||
direct_read.c | ||
direct_write.c | ||
fscache_cache.c | ||
fscache_cookie.c | ||
fscache_internal.h | ||
fscache_io.c | ||
fscache_main.c | ||
fscache_proc.c | ||
fscache_stats.c | ||
fscache_volume.c | ||
internal.h | ||
io.c | ||
iterator.c | ||
Kconfig | ||
locking.c | ||
main.c | ||
Makefile | ||
misc.c | ||
objects.c | ||
stats.c | ||
write_collect.c | ||
write_issue.c |