struct btrfs_root *root, int datacsum,
int packing, int noxattr, struct task_ctx *p);
void (*close_fs)(struct btrfs_convert_context *cctx);
+ int (*check_state)(struct btrfs_convert_context *cctx);
};
static void init_convert_context(struct btrfs_convert_context *cctx)
cctx->convert_ops->close_fs(cctx);
}
+static inline int convert_check_state(struct btrfs_convert_context *cctx)
+{
+ return cctx->convert_ops->check_state(cctx);
+}
+
static int intersect_with_sb(u64 bytenr, u64 num_bytes)
{
int i;
}
memset(&dst->reserved, 0, sizeof(dst->reserved));
}
-static int check_filesystem_state(struct btrfs_convert_context *cctx)
+static int ext2_check_state(struct btrfs_convert_context *cctx)
{
ext2_filsys fs = cctx->fs_data;
.read_used_space = ext2_read_used_space,
.copy_inodes = ext2_copy_inodes,
.close_fs = ext2_close_fs,
+ .check_state = ext2_check_state,
};
#endif
ret = convert_open_fs(devname, &cctx);
if (ret)
goto fail;
- ret = check_filesystem_state(&cctx);
+ ret = convert_check_state(&cctx);
if (ret)
warning(
"source filesystem is not clean, running filesystem check is recommended");