]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs.h
Update bcachefs sources to a8b3ce7599 fixup! bcachefs: Eliminate more PAGE_SIZE uses
[bcachefs-tools-debian] / libbcachefs.h
index 6ae24e9f865f89139fa917db9fc2bc1a55cb3f66..45d2f8740a41479e852411103e38e24a20394b9f 100644 (file)
@@ -12,6 +12,8 @@
 
 /* option parsing */
 
+#define SUPERBLOCK_SIZE_DEFAULT                2048    /* 1 MB */
+
 struct bch_opt_strs {
 union {
        char                    *by_id[bch2_opts_nr];
@@ -30,9 +32,9 @@ void bch2_opts_usage(unsigned);
 struct format_opts {
        char            *label;
        uuid_le         uuid;
-
+       unsigned        version;
+       unsigned        superblock_size;
        unsigned        encoded_extent_max;
-
        bool            encrypted;
        char            *passphrase;
 };
@@ -40,6 +42,8 @@ struct format_opts {
 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,
        };
 }
@@ -90,7 +94,8 @@ struct bchfs_handle {
 
 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)
 {