Skip to content

Conversation

@wuguanghao3
Copy link
Contributor

After the kernel started supporting the logical block size feature, it modified the array metadata, which may lead to compatibility issues. Therefore, a compatibility warning needs to be added.

Links: https://lore.kernel.org/linux-raid/[email protected]/T/#t
Signed-off-by: Wu Guanghao [email protected]

After the kernel started supporting the logical block size feature, it
modified the array metadata, which may lead to compatibility issues.
Therefore, a compatibility warning needs to be added.

Signed-off-by: Wu Guanghao <[email protected]>
if (sysfs_attribute_available(info, NULL, "logical_block_size") &&
sysfs_get_str(info, NULL, "metadata_version", buf, sizeof(buf)) > 0 &&
!memcmp(buf, "1.", 2)) {
pr_info("Arrays created by newer kernels have the logical block size feature enabled "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning here is not really valuable. I don't think people will remember, the array creation and kernel downgrade are usually not corelated,

If you see a risk, and risk is big enough to protect user then you should verify metadata and block mdadm from assembling such array with wrong kernel.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm of course open for discussion, please share you point of view.
For sure there are reasons you implemented it this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants