/* option parsing */
+#define SUPERBLOCK_SIZE_DEFAULT 2048 /* 1 MB */
+
struct bch_opt_strs {
union {
char *by_id[bch2_opts_nr];
struct format_opts {
char *label;
uuid_le uuid;
-
+ unsigned version;
+ unsigned superblock_size;
unsigned encoded_extent_max;
-
bool encrypted;
char *passphrase;
};
static inline struct format_opts format_opts_default()
{
return (struct format_opts) {
+ .version = bcachefs_metadata_version_current,
+ .superblock_size = SUPERBLOCK_SIZE_DEFAULT,
.encoded_extent_max = 128,
};
}
void bcache_fs_close(struct bchfs_handle);
struct bchfs_handle bcache_fs_open(const char *);
-struct bchfs_handle bchu_fs_open_by_dev(const char *, unsigned *);
+struct bchfs_handle bchu_fs_open_by_dev(const char *, int *);
+int bchu_dev_path_to_idx(struct bchfs_handle, const char *);
static inline void bchu_disk_add(struct bchfs_handle fs, char *dev)
{