diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 03:20:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 03:20:40 +0000 |
commit | a8c8b888d4bc9152a17cba6fb0a58856f53d3ff8 (patch) | |
tree | 215fdd019f8ce6f7a919cf37fae0b98163f93787 /super1.c | |
parent | Adding upstream version 4.3. (diff) | |
download | mdadm-a8c8b888d4bc9152a17cba6fb0a58856f53d3ff8.tar.xz mdadm-a8c8b888d4bc9152a17cba6fb0a58856f53d3ff8.zip |
Adding upstream version 4.3+20240412.upstream/4.3+20240412upstream
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; |