};
};
+void bch2_opt_strs_free(struct bch_opt_strs *);
struct bch_opt_strs bch2_cmdline_opts_get(int *, char *[], unsigned);
struct bch_opts bch2_parse_opts(struct bch_opt_strs);
void bch2_opts_usage(unsigned);
uuid_le uuid;
unsigned version;
unsigned superblock_size;
- unsigned encoded_extent_max;
bool encrypted;
char *passphrase;
};
return (struct format_opts) {
.version = bcachefs_metadata_version_current,
.superblock_size = SUPERBLOCK_SIZE_DEFAULT,
- .encoded_extent_max = 128,
};
}
struct dev_opts {
int fd;
char *path;
- u64 size; /* 512 byte sectors */
- unsigned bucket_size;
- const char *group;
+ u64 size; /* bytes*/
+ u64 bucket_size; /* bytes */
+ const char *label;
unsigned data_allowed;
unsigned durability;
bool discard;
void bch2_super_write(int, struct bch_sb *);
struct bch_sb *__bch2_super_read(int, u64);
-void bch2_sb_print(struct bch_sb *, bool, unsigned, enum units);
-
/* ioctl interface: */
int bcachectl_open(void);
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)
{
char *label;
uuid_le uuid;
};
-typedef darray(struct dev_name) dev_names;
+typedef DARRAY(struct dev_name) dev_names;
dev_names bchu_fs_get_devices(struct bchfs_handle);