summaryrefslogtreecommitdiff
path: root/mkfs/main.c
Commit message (Collapse)AuthorAge
* btrfs-progs: add crude error handling when transaction start failsDavid Sterba2017-09-08
| | | | | | | | | | Currently transaction bugs out insided btrfs_start_transaction in case of error, we want to lift the error handling to the callers. This patch adds the BUG_ON anywhere it's been missing so far. This is not the best way of course. Transforming BUG_ON to a proper error handling highly depends on the caller and should be dealt with case by case. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Use named constants for common sizesNikolay Borisov2017-09-08
| | | | | | | | | There multiple places where we use well-known sizes - 1,8,16,32 megabytes. We also have them defined as constants in the sizes.h header. So let's use them. No functional changes. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: Make in-place exit to a common exit blockGu Jinxiang2017-08-24
| | | | | | | | Replace in-place exit with a common exit block in the main function. Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com> [ update changelog ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: delete un-used parameter fdGu Jinxiang2017-08-24
| | | | | | | | Parameter fd is not used in function make_image and traverse_directory of mkfs. Delete it. Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Refactor chunk creation functions to use btrfs_fs_infoQu Wenruo2017-07-12
| | | | | | | | 4 functions are involved in this refactor: btrfs_make_block_group() btrfs_make_block_groups(), btrfs_alloc_chunk, btrfs_alloc_data_chunk(). Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Refactor write_and_map_eb to use btrfs_fs_infoQu Wenruo2017-07-12
| | | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Refactor sectorsize users in mkfs/main.cQu Wenruo2017-07-03
| | | | Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
* btrfs-progs: mkfs: remove unused argument from add_file_itemsDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: remove unused arguments from add_inode_itemsDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: remove unused argument from make_root_dirDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: remove unused argument from set_extent_dirtyDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: remove unused argument from write_and_map_ebDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: make make_cfg::blocks an internal memberDavid Sterba2017-03-08
| | | | | | | The caller of make_btrfs does not need to set it, it's for internal use and can be read after mkfs ends. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move fs features declarations to own header from utilsDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move mkfs definitions to own headerDavid Sterba2017-03-08
| | | | | | | Create a header for filesystem creation API, the config and the main entry function. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move help defines to own headerDavid Sterba2017-03-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs/convert: separate the convert part from make_btrfsDavid Sterba2017-01-27
| | | | | | | The regulare mkfs_btrfs does not anything special about convert and just passes the arguments. Make that two functions. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Fix spelling/typos in user-facing stringsNicholas D Steeves2017-01-25
| | | | | Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: mkfs: annotation of a caseDavid Sterba2016-12-14
| | | | | | | Annotate to silence static analysis warning. Resolves-coverity-id: 1396656 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: move mkfs.btrfs sources to own directoryDavid Sterba2016-12-14
Signed-off-by: David Sterba <dsterba@suse.com>