summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2017-10-19 13:41:36 +0800
committerDavid Sterba <dsterba@suse.com>2017-11-14 15:59:00 +0100
commitfec462240d7722a5952969a1b4c39ce719661ed7 (patch)
tree714a2cf9c498444a7a2bb135f0cf5b44d532d517 /configure.ac
parent625223903e23b46de615e71e9860a17afcd87632 (diff)
btrfs-progs: mkfs: error out gracefully for --rootdir
--rootdir option will start a transaction to fill the fs, however if something goes wrong, from ENOSPC to lack of permission, we won't commit the transaction and cause BUG_ON triggered by uncommitted transaction: ------ extent buffer leak: start 29392896 len 16384 extent_io.c:579: free_extent_buffer: BUG_ON `eb->flags & EXTENT_DIRTY` triggered, value 1 ------ The root fix is to introduce btrfs_abort_transaction() in btrfs-progs, however in this particular case, we can workaround it by force committing the transaction. Since during mkfs, the magic of btrfs is set to an invalid one, without setting fs_info->finalize_on_close() the fs is never able to be mounted. So even we force to commit wrong transaction we won't screw up things worse. 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 'configure.ac')
0 files changed, 0 insertions, 0 deletions