]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Avoid trucating page or punching hole in a already existed hole.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Fri, 30 May 2014 07:16:10 +0000 (15:16 +0800)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:21:06 +0000 (17:21 -0700)
commitb33da95dc60a59c7184f95fd810940ef8592556c
tree0d0a59e05a2e96aa9d6cafb7c7170877b64fb588
parent26792895cfd88cc7c2d05607e65e10587a68c96e
btrfs: Avoid trucating page or punching hole in a already existed hole.

btrfs_punch_hole() will truncate unaligned pages or punch hole on a
already existed hole.
This will cause unneeded zero page or holes splitting the original huge
hole.

This patch will skip already existed holes before any page truncating or
hole punching.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/file.c