[PATCH for v4.9 LTS 37/87] Btrfs: adjust outstanding_extents counter properly when dio write is split

2017-07-14 Thread Levin, Alexander (Sasha Levin)
From: Liu Bo [ Upstream commit c2931667c83ded6504b3857e99cc45b21fa496fb ] 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

[PATCH for v4.9 LTS 37/87] Btrfs: adjust outstanding_extents counter properly when dio write is split

2017-07-14 Thread Levin, Alexander (Sasha Levin)
From: Liu Bo [ Upstream commit c2931667c83ded6504b3857e99cc45b21fa496fb ] 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