]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: add a check to decide if we should defrag the range
authorLiu Bo <liubo2009@cn.fujitsu.com>
Thu, 29 Mar 2012 13:57:45 +0000 (09:57 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 29 Mar 2012 13:57:45 +0000 (09:57 -0400)
commit0ca2ad0af3c59bfef45a3b1924d40461ab24a2d4
tree4a54d3c5618efff3deec03fa5d32a42c0a8fc804
parent6624e1326ae92f0321022e35a815a29f105354fb
Btrfs: add a check to decide if we should defrag the range

If our file's layout is as follows:
| hole | data1 | hole | data2 |

we do not need to defrag this file, because this file has holes and
cannot be merged into one extent.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ioctl.c