提交 b31bed17 编写于 作者: J Josef Bacik 提交者: David Sterba

btrfs: move btrfs_chunk_item_size out of ctree.h

This is used by the volumes code and the tree checker code.  We want to
maintain inline however, so simply move it to volumes.h.
Signed-off-by: NJosef Bacik <josef@toxicpanda.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 cb9a10a6
......@@ -54,13 +54,6 @@ struct btrfs_balance_control;
struct btrfs_delayed_root;
struct reloc_control;
static inline unsigned long btrfs_chunk_item_size(int num_stripes)
{
BUG_ON(num_stripes == 0);
return sizeof(struct btrfs_chunk) +
sizeof(struct btrfs_stripe) * (num_stripes - 1);
}
/* Read ahead values for struct btrfs_path.reada */
enum {
READA_NONE,
......
......@@ -10,6 +10,7 @@
#include <linux/sort.h>
#include <linux/btrfs.h>
#include "async-thread.h"
#include "messages.h"
#define BTRFS_MAX_DATA_CHUNK_SIZE (10ULL * SZ_1G)
......@@ -605,6 +606,13 @@ static inline enum btrfs_map_op btrfs_op(struct bio *bio)
}
}
static inline unsigned long btrfs_chunk_item_size(int num_stripes)
{
ASSERT(num_stripes);
return sizeof(struct btrfs_chunk) +
sizeof(struct btrfs_stripe) * (num_stripes - 1);
}
void btrfs_get_bioc(struct btrfs_io_context *bioc);
void btrfs_put_bioc(struct btrfs_io_context *bioc);
int btrfs_map_block(struct btrfs_fs_info *fs_info, enum btrfs_map_op op,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册