btrfs-progs: convert: move convert_read_used_space
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
52df1d80a3
commit
3c3c59f077
|
@ -919,6 +919,22 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read used space, and since we have the used space,
|
||||
* calcuate data_chunks and free for later mkfs
|
||||
*/
|
||||
static int convert_read_used_space(struct btrfs_convert_context *cctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = cctx->convert_ops->read_used_space(cctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = calculate_available_space(cctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Open Ext2fs in readonly mode, read block allocation bitmap and
|
||||
* inode bitmap into memory.
|
||||
|
@ -2257,22 +2273,6 @@ static int convert_open_fs(const char *devname,
|
|||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read used space, and since we have the used space,
|
||||
* calcuate data_chunks and free for later mkfs
|
||||
*/
|
||||
static int convert_read_used_space(struct btrfs_convert_context *cctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = cctx->convert_ops->read_used_space(cctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = calculate_available_space(cctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int do_convert(const char *devname, int datacsum, int packing,
|
||||
int noxattr, u32 nodesize, int copylabel, const char *fslabel,
|
||||
int progress, u64 features)
|
||||
|
|
Loading…
Reference in a new issue