Skip to content
Commit a23eaa87 authored by Liu Bo's avatar Liu Bo Committed by David Sterba
Browse files

Btrfs: adjust len of writes if following a preallocated extent



If we have

|0--hole--4095||4096--preallocate--12287|

instead of using preallocated space, a 8K direct write will just
create a new 8K extent and it'll end up with

|0--new extent--8191||8192--preallocate--12287|

It's because we find a hole em and then go to create a new 8K
extent directly without adjusting @len.

Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: default avatarChris Mason <clm@fb.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 7b9ea627
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