]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix data allocation hint start
authorJosef Bacik <josef@redhat.com>
Wed, 11 Nov 2009 02:23:47 +0000 (21:23 -0500)
committerChris Mason <chris.mason@oracle.com>
Wed, 11 Nov 2009 19:20:16 +0000 (14:20 -0500)
commitd9b3360e4e6e60ad32fbf465a2a777f2d3714bb9
tree78e5fbc5fa6ed8c692db24dfff475e2b95413570
parent1c2f6ddae42a54391098d72be0115fd2d48e34ad
Btrfs: fix data allocation hint start

Sometimes our start allocation hint when we cow a file can be either
EXTENT_HOLE or some other such place holder, which is not optimal.  So if we
find that our em->block_start is one of these special values, check to see
where the first block of the inode is stored, and use that as a hint.  If that
block is also a special value, just fallback on a hint of 0 and let the
allocator figure out a good place to put the data.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c