]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: sectorsize align offsets in fiemap
authorJosef Bacik <josef@redhat.com>
Thu, 17 Nov 2011 16:34:31 +0000 (11:34 -0500)
committerChris Mason <chris.mason@oracle.com>
Fri, 16 Dec 2011 19:39:56 +0000 (14:39 -0500)
commit321d6d82195d469eccb8fde3ff7d6d14cbfb2b6b
tree96a1affb0dbe45146b8b377f6bdbcfb076bc477c
parent2b66fa1f8ecaeba175261299b0653ea4786af3e2
Btrfs: sectorsize align offsets in fiemap

We've been hitting BUG()'s in btrfs_cont_expand and btrfs_fallocate and anywhere
else that calls btrfs_get_extent while running xfstests 13 in a loop.  This is
because fiemap is calling btrfs_get_extent with non-sectorsize aligned offsets,
which will end up adding mappings that are not sectorsize aligned, which will
cause problems in some cases for subsequent calls to btrfs_get_extent for
similar areas that are sectorsize aligned.  With this patch I ran xfstests 13 in
a loop for a couple of hours and didn't hit the problem that I could previously
hit in at most 20 minutes.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
(cherry picked from commit 4d479cf010d56ec9c54f3099992d039918f1296b)
fs/btrfs/extent_io.c