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

Btrfs: adjust outstanding_extents counter properly when dio write is split



Currently how btrfs dio deals with split dio write is not good
enough if dio write is split into several segments due to the
lack of contiguous space, a large dio write like 'dd bs=1G count=1'
can end up with incorrect outstanding_extents counter and endio
would complain loudly with an assertion.

This fixes the problem by compensating the outstanding_extents
counter in inode if a large dio write gets split.

Reported-by: default avatarAnand Jain <anand.jain@oracle.com>
Tested-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 781feef7
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