summaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2017-10-19 13:41:33 +0800
committerDavid Sterba <dsterba@suse.com>2017-11-14 15:59:00 +0100
commit66e485873cf21e03cee5fe59b5dce807d2ac53ea (patch)
tree4875a0c74adcea344140bfe4eadcf8df279cd185 /mkfs
parenta624f1616731da6113ab9c6613be733ab41e664b (diff)
btrfs-progs: mkfs: avoid BUG_ON for chunk allocation when ENOSPC happens
When passing directory larger than block device using --rootdir parameter, we get the following backtrace: ------ extent-tree.c:2693: btrfs_reserve_extent: BUG_ON `ret` triggered, value -28 ./mkfs.btrfs(+0x1a05d)[0x557939e6b05d] ./mkfs.btrfs(btrfs_reserve_extent+0xb5a)[0x557939e710c8] ./mkfs.btrfs(+0xb0b6)[0x557939e5c0b6] ./mkfs.btrfs(main+0x15d5)[0x557939e5de04] /usr/lib/libc.so.6(__libc_start_main+0xea)[0x7f83b101af6a] ./mkfs.btrfs(_start+0x2a)[0x557939e5af5a] ------ Nothing special, just BUG_ON() abusing from ancient code. Fix them by using correct return. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mkfs')
0 files changed, 0 insertions, 0 deletions