* Hole punch races in GFS2
@ 2021-04-22 11:26 Jan Kara
0 siblings, 0 replies; only message in thread
From: Jan Kara @ 2021-04-22 11:26 UTC (permalink / raw)
To: Bob Peterson; +Cc: Andreas Gruenbacher, cluster-devel, linux-fsdevel
Hello,
I am looking into how GFS2 protects against races between hole punching and
things like page fault or readahead and AFAICT it seems it does not. In
particular is there anything that protects against a race like:
CPU1 CPU2
gfs2_fallocate()
__gfs2_punch_hole()
truncate_pagecache_range()
gfs2_fault()
- faults in old data into page
cache
punch_hole()
And now we have stale data in the page cache (data corruption). If
gfs2_page_mkwrite() sneaked in that window as well, we might be even racing
with writeback and are possibly corrupting the filesystem on disk. Is there
anything I'm missing?
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-22 11:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-22 11:26 Hole punch races in GFS2 Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).