struct format_opts {
char *label;
- uuid_le uuid;
+ __uuid_t uuid;
unsigned version;
unsigned superblock_size;
bool encrypted;
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,
};
}
int bcachectl_open(void);
struct bchfs_handle {
- uuid_le uuid;
- int ioctl_fd;
- int sysfs_fd;
+ __uuid_t uuid;
+ int ioctl_fd;
+ int sysfs_fd;
};
void bcache_fs_close(struct bchfs_handle);
unsigned idx;
char *dev;
char *label;
- uuid_le uuid;
+ uuid_t uuid;
};
typedef DARRAY(struct dev_name) dev_names;