]> rtime.felk.cvut.cz Git - linux-imx.git/commit
Btrfs: allow splitting of hole em's when dropping extent cache
authorJosef Bacik <jbacik@fusionio.com>
Thu, 11 Jul 2013 14:34:59 +0000 (10:34 -0400)
committerChris Mason <chris.mason@fusionio.com>
Fri, 9 Aug 2013 23:30:09 +0000 (19:30 -0400)
commitee20a98314e52a6675e94d1a07ca205ffdf09a72
tree7a4b93b7c6b3603795a36464944d8c479806e41c
parented8c4913da4951957bf8afc788522788881ff405
Btrfs: allow splitting of hole em's when dropping extent cache

I noticed while running multi-threaded fsync tests that sometimes fsck would
complain about an improper gap.  This happens because we fail to add a hole
extent to the file, which was happening when we'd split a hole EM because
btrfs_drop_extent_cache was just discarding the whole em instead of splitting
it.  So this patch fixes this by allowing us to split a hole em properly, which
means that added holes actually get logged properly and we no longer see this
fsck error.  Thankfully we're tolerant of these sort of problems so a user would
not see any adverse effects of this bug, other than fsck complaining.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/file.c