btrfs-progs/convert
Marcos Paulo de Souza e44adcc5bc btrfs-progs: convert: make ASSERT not truncate cctx.total_bytes value
Commit "btrfs-progs: convert: prevent 32bit overflow for
cctx->total_bytes" added an assert to ensure that cctxx.total_bytes did
not overflow, but this ASSERT calls assert_trace, which expects a long
value.

By converting the u64 to long overflows in a 32bit machine, leading the
assert_trace to be triggered since cctx.total_bytes turns to zero.

Fix this problem by comparing the cctx.total_bytes with zero when
calling ASSERT.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-08-31 17:00:37 +02:00
..
common.c btrfs-progs: sync block group item accessors from kernel 2020-05-11 20:49:46 +02:00
common.h btrfs-progs: lots of typo fixes (codespell) 2020-03-31 18:37:38 +02:00
main.c btrfs-progs: convert: make ASSERT not truncate cctx.total_bytes value 2020-08-31 17:00:37 +02:00
Makefile btrfs-progs: build: add stub makefile to convert 2017-03-08 13:00:46 +01:00
source-ext2.c btrfs-progs: convert: prevent 32bit overflow for cctx->total_bytes 2020-08-28 18:31:06 +02:00
source-ext2.h btrfs-progs: convert: fix support for e2fsprogs < 1.42 2018-06-07 16:37:35 +02:00
source-fs.c btrfs-progs: rename btrfs_block_group_cache to btrfs_block_group 2020-05-11 20:50:00 +02:00
source-fs.h btrfs-progs: fix typos in comments 2018-11-26 18:24:48 +01:00
source-reiserfs.c btrfs-progs: convert: prevent 32bit overflow for cctx->total_bytes 2020-08-28 18:31:06 +02:00
source-reiserfs.h btrfs-progs: convert: move reiserfs struct definitions to header 2017-09-08 16:15:05 +02:00