diff options
author | Xiao Ni <xni@redhat.com> | 2024-10-18 10:48:17 +0200 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-10-18 14:50:09 +0200 |
commit | b278b2fc172bb8d50f607adef4d515af1f52d913 (patch) | |
tree | 83e4ca42a58695707fe726cc3cb6ee5945ee1c6f /Grow.c | |
parent | mdadm/Manage: Clear superblock if adding new device fails (diff) | |
download | mdadm-b278b2fc172bb8d50f607adef4d515af1f52d913.tar.xz mdadm-b278b2fc172bb8d50f607adef4d515af1f52d913.zip |
mdadm/Grow: Check new_level interface rather than kernel version
Different os distributions have different kernel version themselves.
Check new_level sysfs interface rather than kernel version.
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to '')
-rw-r--r-- | Grow.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2952,7 +2952,7 @@ static int impose_reshape(struct mdinfo *sra, err = errno; /* new_level is introduced in kernel 6.12 */ - if (!err && get_linux_version() >= 6012000 && + if (!err && sysfs_attribute_available(sra, NULL, "new_level") && sysfs_set_num(sra, NULL, "new_level", info->new_level) < 0) err = errno; |