Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit f32f20e2 authored by Tavian Barnes's avatar Tavian Barnes Committed by David Sterba
Browse files

btrfs: warn if EXTENT_BUFFER_UPTODATE is set while reading


We recently tracked down a race condition that triggered a read for an
extent buffer with EXTENT_BUFFER_UPTODATE already set.  While this read
was in progress, other concurrent readers would see the UPTODATE bit and
return early as if the read was already complete, making accesses to the
extent buffer conflict with the read operation that was overwriting it.

Add a WARN_ON() to end_bbio_meta_read() for this situation to make
similar races easier to spot in the future.

Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarTavian Barnes <tavianator@tavianator.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 1e2d1837
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment