diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-07-27 08:37:55 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2012-10-02 13:02:48 +0200 |
commit | 605e806166847872bb91831b397d58f95027975a (patch) | |
tree | 94032f0e981816e4d36a74003abb5d7c757cd226 /utils.h | |
parent | 45e9ec733deb73672c9bae3b1adf50f44bc8ae0c (diff) |
Btrfs-progs: only enforce a maximum size if we specify one
My patch
04609add88ef8428d725de6ef60f46a3ff0dbc8e
introduced a regression where if you mkfs'ed a group of disks with different
sizes it limited the disks to the size of the first one that is specified.
This was not the intent of my patch, I only want it to limit the size based
on the -b option, so I've reworked the code to pass in a max block count and
that fixes the issue. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -26,10 +26,8 @@ int make_btrfs(int fd, const char *device, const char *label, u32 leafsize, u32 sectorsize, u32 stripesize); int btrfs_make_root_dir(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid); -int btrfs_prepare_device(int fd, char *file, int zero_end, - u64 *block_count_ret, int *mixed); -int __btrfs_prepare_device(int fd, char *file, int zero_end, - u64 *block_count_ret, int *mixed, int nodiscard); +int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret, + u64 max_block_count, int *mixed, int nodiscard); int btrfs_add_to_fsid(struct btrfs_trans_handle *trans, struct btrfs_root *root, int fd, char *path, u64 block_count, u32 io_width, u32 io_align, |