diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 03:11:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 03:11:03 +0000 |
commit | 34c394519b9c898db784b09e3503ed21a7d3dbe9 (patch) | |
tree | 215fdd019f8ce6f7a919cf37fae0b98163f93787 /super1.c | |
parent | Adding upstream version 4.3. (diff) | |
download | mdadm-34c394519b9c898db784b09e3503ed21a7d3dbe9.tar.xz mdadm-34c394519b9c898db784b09e3503ed21a7d3dbe9.zip |
Adding upstream version 4.3+20240412.upstream/4.3+20240412
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'super1.c')
-rw-r--r-- | super1.c | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -575,17 +575,6 @@ static void examine_super1(struct supertype *st, char *homehost) inconsistent = 1; } } -#if 0 - /* This is confusing too */ - faulty = 0; - for (i = 0; i < __le32_to_cpu(sb->max_dev); i++) { - int role = __le16_to_cpu(sb->dev_roles[i]); - if (role == MD_DISK_ROLE_FAULTY) - faulty++; - } - if (faulty) - printf(" %d failed", faulty); -#endif printf(" ('A' == active, '.' == missing, 'R' == replacing)"); printf("\n"); for (d = 0; d < __le32_to_cpu(sb->max_dev); d++) { @@ -1752,7 +1741,10 @@ static int add_to_super1(struct supertype *st, mdu_disk_info_t *dk, di->devname = devname; di->disk = *dk; di->data_offset = data_offset; - get_dev_size(fd, NULL, &di->dev_size); + + if (is_fd_valid(fd)) + get_dev_size(fd, NULL, &di->dev_size); + di->next = NULL; *dip = di; |