mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
Update bcachefs sources to b0e2c6125656 bcachefs: Fix accounting_read() skip past non-in-mem keys
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
9869945621
commit
19c32bc7a2
@ -1 +1 @@
|
||||
32ed7123aeacc7486df3d04c1540b18a7105936a
|
||||
b0e2c6125656a3ef24d52fa60546dc30d2dd17f3
|
||||
|
||||
@ -646,7 +646,8 @@ int bch2_parse_one_mount_opt(struct bch_fs *c, struct bch_opts *opts,
|
||||
|
||||
val = bch2_opt_val_synonym_lookup(name, val);
|
||||
|
||||
if (!(bch2_opt_table[id].flags & OPT_MOUNT))
|
||||
if (!(bch2_opt_table[id].flags & OPT_MOUNT) &&
|
||||
!(bch2_opt_table[id].flags & OPT_MOUNT_OLD))
|
||||
return -BCH_ERR_option_name;
|
||||
|
||||
if ((id == Opt_usrquota ||
|
||||
@ -669,6 +670,12 @@ int bch2_parse_one_mount_opt(struct bch_fs *c, struct bch_opts *opts,
|
||||
if (ret < 0)
|
||||
return -BCH_ERR_option_value;
|
||||
|
||||
if (bch2_opt_table[id].flags & OPT_MOUNT_OLD) {
|
||||
pr_err("option %s may no longer be specified at mount time; set via sysfs opts dir",
|
||||
bch2_opt_table[id].attr.name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (opts)
|
||||
bch2_opt_set_by_id(opts, id, v);
|
||||
|
||||
|
||||
@ -66,6 +66,7 @@ enum opt_flags {
|
||||
OPT_SB_FIELD_ILOG2 = BIT(9), /* Superblock field is ilog2 of actual value */
|
||||
OPT_SB_FIELD_ONE_BIAS = BIT(10), /* 0 means default value */
|
||||
OPT_HIDDEN = BIT(11),
|
||||
OPT_MOUNT_OLD = BIT(12), /* May not be specified at mount time, but don't fail the mount */
|
||||
};
|
||||
|
||||
enum opt_type {
|
||||
@ -149,12 +150,12 @@ enum fsck_err_opts {
|
||||
BCH_SB_WRITE_ERROR_TIMEOUT, 30, \
|
||||
NULL, "Number of consecutive write errors allowed before kicking out a device")\
|
||||
x(metadata_replicas, u8, \
|
||||
OPT_FS|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_UINT(1, BCH_REPLICAS_MAX + 1), \
|
||||
BCH_SB_META_REPLICAS_WANT, 1, \
|
||||
"#", "Number of metadata replicas") \
|
||||
x(data_replicas, u8, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_UINT(1, BCH_REPLICAS_MAX + 1), \
|
||||
BCH_SB_DATA_REPLICAS_WANT, 1, \
|
||||
"#", "Number of data replicas") \
|
||||
@ -175,12 +176,12 @@ enum fsck_err_opts {
|
||||
BCH_SB_ENCODED_EXTENT_MAX_BITS, 64 << 10, \
|
||||
"size", "Maximum size of checksummed/compressed extents")\
|
||||
x(metadata_checksum, u8, \
|
||||
OPT_FS|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_STR(__bch2_csum_opts), \
|
||||
BCH_SB_META_CSUM_TYPE, BCH_CSUM_OPT_crc32c, \
|
||||
NULL, NULL) \
|
||||
x(data_checksum, u8, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_STR(__bch2_csum_opts), \
|
||||
BCH_SB_DATA_CSUM_TYPE, BCH_CSUM_OPT_crc32c, \
|
||||
NULL, NULL) \
|
||||
@ -190,12 +191,12 @@ enum fsck_err_opts {
|
||||
BCH_SB_CSUM_ERR_RETRY_NR, 3, \
|
||||
NULL, NULL) \
|
||||
x(compression, u8, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_FN(bch2_opt_compression), \
|
||||
BCH_SB_COMPRESSION_TYPE, BCH_COMPRESSION_OPT_none, \
|
||||
NULL, NULL) \
|
||||
x(background_compression, u8, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_FN(bch2_opt_compression), \
|
||||
BCH_SB_BACKGROUND_COMPRESSION_TYPE,BCH_COMPRESSION_OPT_none, \
|
||||
NULL, NULL) \
|
||||
@ -205,27 +206,27 @@ enum fsck_err_opts {
|
||||
BCH_SB_STR_HASH_TYPE, BCH_STR_HASH_OPT_siphash, \
|
||||
NULL, "Hash function for directory entries and xattrs")\
|
||||
x(metadata_target, u16, \
|
||||
OPT_FS|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_FN(bch2_opt_target), \
|
||||
BCH_SB_METADATA_TARGET, 0, \
|
||||
"(target)", "Device or label for metadata writes") \
|
||||
x(foreground_target, u16, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_FN(bch2_opt_target), \
|
||||
BCH_SB_FOREGROUND_TARGET, 0, \
|
||||
"(target)", "Device or label for foreground writes") \
|
||||
x(background_target, u16, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_FN(bch2_opt_target), \
|
||||
BCH_SB_BACKGROUND_TARGET, 0, \
|
||||
"(target)", "Device or label to move data to in the background")\
|
||||
x(promote_target, u16, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_FN(bch2_opt_target), \
|
||||
BCH_SB_PROMOTE_TARGET, 0, \
|
||||
"(target)", "Device or label to promote data to on read") \
|
||||
x(erasure_code, u16, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_RUNTIME, \
|
||||
OPT_FS|OPT_INODE|OPT_FORMAT|OPT_MOUNT_OLD|OPT_RUNTIME, \
|
||||
OPT_BOOL(), \
|
||||
BCH_SB_ERASURE_CODE, false, \
|
||||
NULL, "Enable erasure coding (DO NOT USE YET)") \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user