Btrfs-progs: fix a bug of converting sparse ext2/3/4
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 25 Nov 2014 09:35:52 +0000 (17:35 +0800)
committerDavid Sterba <dsterba@suse.cz>
Tue, 25 Nov 2014 18:39:44 +0000 (19:39 +0100)
commitad96e8f4d656b6b46253b2122a96d5e9c4a17b18
treed15c4f9fcc62480001c4736dd26bb0ed13bbfeea
parentb5e1ca5a49eade75bd411d0f6b5c6adb2257de31
Btrfs-progs: fix a bug of converting sparse ext2/3/4

When converting a sparse ext* filesystem, btrfs-convert adds checksum extents
for empty extents, whose disk_bytenr = 0, and this can end up with some weird
problems, one of them is the failure of reading free space cache inode on
mounting converted btrfs.

The fix is simple, just to skip making checksum on empty extents.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
btrfs-convert.c