static inline struct format_opts format_opts_default()
{
+ unsigned version = !access( "/sys/module/bcachefs/parameters/version", R_OK)
+ ? read_file_u64(AT_FDCWD, "/sys/module/bcachefs/parameters/version")
+ : bcachefs_metadata_version_current;
+
return (struct format_opts) {
- .version = bcachefs_metadata_version_current,
+ .version = version,
.superblock_size = SUPERBLOCK_SIZE_DEFAULT,
};
}
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);
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);