Commit 522c25f0 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix BCH_REPLICAS_MAX check

Ideally, this limit will be going away in the future.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 0093a50f
...@@ -283,19 +283,19 @@ const char *bch2_sb_validate(struct bch_sb_handle *disk_sb) ...@@ -283,19 +283,19 @@ const char *bch2_sb_validate(struct bch_sb_handle *disk_sb)
return "Bad number of member devices"; return "Bad number of member devices";
if (!BCH_SB_META_REPLICAS_WANT(sb) || if (!BCH_SB_META_REPLICAS_WANT(sb) ||
BCH_SB_META_REPLICAS_WANT(sb) >= BCH_REPLICAS_MAX) BCH_SB_META_REPLICAS_WANT(sb) > BCH_REPLICAS_MAX)
return "Invalid number of metadata replicas"; return "Invalid number of metadata replicas";
if (!BCH_SB_META_REPLICAS_REQ(sb) || if (!BCH_SB_META_REPLICAS_REQ(sb) ||
BCH_SB_META_REPLICAS_REQ(sb) >= BCH_REPLICAS_MAX) BCH_SB_META_REPLICAS_REQ(sb) > BCH_REPLICAS_MAX)
return "Invalid number of metadata replicas"; return "Invalid number of metadata replicas";
if (!BCH_SB_DATA_REPLICAS_WANT(sb) || if (!BCH_SB_DATA_REPLICAS_WANT(sb) ||
BCH_SB_DATA_REPLICAS_WANT(sb) >= BCH_REPLICAS_MAX) BCH_SB_DATA_REPLICAS_WANT(sb) > BCH_REPLICAS_MAX)
return "Invalid number of data replicas"; return "Invalid number of data replicas";
if (!BCH_SB_DATA_REPLICAS_REQ(sb) || if (!BCH_SB_DATA_REPLICAS_REQ(sb) ||
BCH_SB_DATA_REPLICAS_REQ(sb) >= BCH_REPLICAS_MAX) BCH_SB_DATA_REPLICAS_REQ(sb) > BCH_REPLICAS_MAX)
return "Invalid number of data replicas"; return "Invalid number of data replicas";
if (BCH_SB_META_CSUM_TYPE(sb) >= BCH_CSUM_OPT_NR) if (BCH_SB_META_CSUM_TYPE(sb) >= BCH_CSUM_OPT_NR)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment