]> 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)
commit13c73a7f318dffa368442dedd59a65f8957fad5a
tree4a54d3c5618efff3deec03fa5d32a42c0a8fc804
parent0d3ac4b182c6815182b49b1717e3ceb488ff17b2
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