]> git.hungrycats.org Git - linux/commit
Btrfs: fix merge delalloc logic
authorJosef Bacik <jbacik@fb.com>
Fri, 13 Mar 2015 19:12:08 +0000 (15:12 -0400)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Fri, 27 Mar 2015 03:33:57 +0000 (23:33 -0400)
commit46e26426ae373dca2c2a7717d9d7da783e60cb0d
treede6db2d13ee01f5a9cd961014339af2d54cdf84e
parent3734ca895bf7ee6f7ad565909cde698cc04a5f86
Btrfs: fix merge delalloc logic

My patch to properly count outstanding extents wrt MAX_EXTENT_SIZE introduced a
regression when re-dirtying already dirty areas.  We have logic in split to make
sure we are taking the largest space into account but didn't have it for merge,
so it was sometimes making us think we were turning a tiny extent into a huge
extent, when in reality we already had a huge extent and needed to use the other
side in our logic.  This fixes the regression that was reported by a user on
list.  Thanks,

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit 8461a3de770477a9a7b8eeaebcc4804dbc26ca38)
fs/btrfs/inode.c