Skip to content
Commit 46bfbb5c authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: fix preallocation and nodatacow checks in O_DIRECT



The O_DIRECT code wasn't checking for multiple references
on preallocated or nodatacow extents.  This means it
wasn't honoring snapshots properly.

The fix here is to add an explicit check for multiple references
This also fixes the math for selecting the correct disk block,
making sure not to go past the end of the extent.

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 94b60442
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment