mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
format: Don't format with a version higher than supported by tools
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
3609bf8161
commit
0da097dcb2
@ -63,9 +63,12 @@ static inline struct format_opts format_opts_default()
|
||||
*/
|
||||
(void)!system("modprobe bcachefs > /dev/null 2>&1");
|
||||
|
||||
unsigned kernel_version = bcachefs_kernel_version();
|
||||
|
||||
return (struct format_opts) {
|
||||
.version = bcachefs_kernel_version() ?:
|
||||
bcachefs_metadata_version_current,
|
||||
.version = kernel_version
|
||||
? min(bcachefs_metadata_version_current, kernel_version)
|
||||
: bcachefs_metadata_version_current,
|
||||
.superblock_size = SUPERBLOCK_SIZE_DEFAULT,
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user