Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mdadm for openSUSE:Factory checked in at 2026-02-24 15:38:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mdadm (Old) and /work/SRC/openSUSE:Factory/.mdadm.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mdadm" Tue Feb 24 15:38:04 2026 rev:164 rq:1334563 version:4.5+43.gdc69a22f Changes: -------- --- /work/SRC/openSUSE:Factory/mdadm/mdadm.changes 2026-01-29 17:42:01.369959765 +0100 +++ /work/SRC/openSUSE:Factory/.mdadm.new.1977/mdadm.changes 2026-02-24 15:38:24.673947407 +0100 @@ -1,0 +2,8 @@ +Mon Feb 23 16:49:21 UTC 2026 - Martin Wilck <[email protected]> + +- Update to version 4.5+43.gdc69a22f: + * Fix slowdown probing non-RAID devices (bsc#1258255) + * platform-intel: Deal with hot-unplugged devices (bsc#1258265) + * imsm: Fix UEFI backward compatibility for RAID10D4 (bsc#1257009) + +------------------------------------------------------------------- Old: ---- mdadm-4.5+39.g1aa6e5de.tar.xz New: ---- mdadm-4.5+43.gdc69a22f.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mdadm.spec ++++++ --- /var/tmp/diff_new_pack.rjnJqb/_old 2026-02-24 15:38:25.429978790 +0100 +++ /var/tmp/diff_new_pack.rjnJqb/_new 2026-02-24 15:38:25.429978790 +0100 @@ -22,7 +22,7 @@ %endif Name: mdadm -Version: 4.5+39.g1aa6e5de +Version: 4.5+43.gdc69a22f Release: 0 BuildRequires: binutils-devel BuildRequires: groff ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.rjnJqb/_old 2026-02-24 15:38:25.469980451 +0100 +++ /var/tmp/diff_new_pack.rjnJqb/_new 2026-02-24 15:38:25.473980617 +0100 @@ -1,5 +1,5 @@ -mtime: 1769529258 -commit: bb64f4f4a07758b2b86f28f6b5e54b81b56dfe1ecf2fb3e1801d64019eb5c31c +mtime: 1771865515 +commit: 2719ec626801eab2b1fc491e5dd862841996d5bfd55328002b5254632b85550e url: https://src.opensuse.org/mwilck/mdadm revision: factory ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.rjnJqb/_old 2026-02-24 15:38:25.501981779 +0100 +++ /var/tmp/diff_new_pack.rjnJqb/_new 2026-02-24 15:38:25.505981945 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/mdadm.git</param> - <param name="changesrevision">1aa6e5dea946b47136b0d157f06dbaece3f29634</param></service></servicedata> + <param name="changesrevision">dc69a22f00a52e6a4e5f42a8f103556ef330d997</param></service></servicedata> (No newline at EOF) ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-02-23 17:52:23.000000000 +0100 @@ -0,0 +1,3 @@ +.osc +*~ +/mdadm/ ++++++ mdadm-4.5+39.g1aa6e5de.tar.xz -> mdadm-4.5+43.gdc69a22f.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdadm-4.5+39.g1aa6e5de/config.c new/mdadm-4.5+43.gdc69a22f/config.c --- old/mdadm-4.5+39.g1aa6e5de/config.c 2026-01-27 16:44:04.000000000 +0100 +++ new/mdadm-4.5+43.gdc69a22f/config.c 2026-02-23 17:40:44.000000000 +0100 @@ -83,7 +83,7 @@ enum linetype { Devices, Array, Mailaddr, Mailfrom, Program, CreateDev, Homehost, HomeCluster, AutoMode, Policy, PartPolicy, Sysfs, - MonitorDelay, EncryptionNoVerify, LTEnd }; + MonitorDelay, EncryptionNoVerify, Probing, LTEnd }; char *keywords[] = { [Devices] = "devices", [Array] = "array", @@ -99,6 +99,7 @@ [Sysfs] = "sysfs", [MonitorDelay] = "monitordelay", [EncryptionNoVerify] = "ENCRYPTION_NO_VERIFY", + [Probing] = "probing", [LTEnd] = NULL }; @@ -689,6 +690,19 @@ } } +static bool probing_ddf_extended; +void probing_line(char *line) +{ + char *word; + + for (word = dl_next(line); word != line; word = dl_next(word)) { + if (strcasecmp(word, "ddf_extended") == 0) + probing_ddf_extended = true; + else + pr_err("unrecognised word on PROBING line: %s\n", word); + } +} + char auto_yes[] = "yes"; char auto_no[] = "no"; char auto_homehost[] = "homehost"; @@ -876,6 +890,9 @@ case EncryptionNoVerify: encryption_no_verify_line(line); break; + case Probing: + probing_line(line); + break; default: pr_err("Unknown keyword %s\n", line); } @@ -1045,6 +1062,12 @@ return sata_opal_encryption_no_verify; } +bool conf_get_probing_ddf_extended(void) +{ + load_conffile(); + return probing_ddf_extended; +} + struct createinfo *conf_get_create_info(void) { load_conffile(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdadm-4.5+39.g1aa6e5de/mdadm.conf.5.in new/mdadm-4.5+43.gdc69a22f/mdadm.conf.5.in --- old/mdadm-4.5+39.g1aa6e5de/mdadm.conf.5.in 2026-01-27 16:44:04.000000000 +0100 +++ new/mdadm-4.5+43.gdc69a22f/mdadm.conf.5.in 2026-02-23 17:40:44.000000000 +0100 @@ -621,6 +621,19 @@ Available parameter .I "sata_opal". +.TP +.B PROBING +The +.B PROBING +line provides options to configure device probing. +.RS 4 +.TP +.B ddf_extended +Use extended algorithm to detect DDF headers on disks. Instead of looking for +the DDF super block only in the last block of the device, scan the last 32 +MB. This allows detection of metadata created by some RAID controllers, at the +cost of slower probing. +.RE .SH FILES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdadm-4.5+39.g1aa6e5de/mdadm.h new/mdadm-4.5+43.gdc69a22f/mdadm.h --- old/mdadm-4.5+39.g1aa6e5de/mdadm.h 2026-01-27 16:44:04.000000000 +0100 +++ new/mdadm-4.5+43.gdc69a22f/mdadm.h 2026-02-23 17:40:44.000000000 +0100 @@ -1636,6 +1636,7 @@ extern char *conf_get_homecluster(void); extern int conf_get_monitor_delay(void); extern bool conf_get_sata_opal_encryption_no_verify(void); +extern bool conf_get_probing_ddf_extended(void); extern char *conf_line(FILE *file); extern char *conf_word(FILE *file, int allow_key); extern void print_quoted(char *str); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdadm-4.5+39.g1aa6e5de/platform-intel.c new/mdadm-4.5+43.gdc69a22f/platform-intel.c --- old/mdadm-4.5+39.g1aa6e5de/platform-intel.c 2026-01-27 16:44:04.000000000 +0100 +++ new/mdadm-4.5+43.gdc69a22f/platform-intel.c 2026-02-23 17:40:44.000000000 +0100 @@ -233,6 +233,13 @@ if (type == SYS_DEV_NVME) { struct sys_dev *dev; char *rp = realpath(path, NULL); + if (!rp) { + /* Device may have been hot-unplugged */ + if (errno != ENOENT) + pr_err("Unable to get real path for '%s', err = %d\n", + path, errno); + continue; + } for (dev = vmd; dev; dev = dev->next) { if ((strncmp(dev->path, rp, strlen(dev->path)) == 0)) skip = 1; @@ -244,6 +251,13 @@ if (type == SYS_DEV_SATA) { struct sys_dev *dev; char *rp = realpath(path, NULL); + if (!rp) { + /* Device may have been hot-unplugged */ + if (errno != ENOENT) + pr_err("Unable to get real path for '%s', err = %d\n", + path, errno); + continue; + } for (dev = vmd; dev; dev = dev->next) { if ((strncmp(dev->path, rp, strlen(dev->path)) == 0)) type = SYS_DEV_SATA_VMD; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdadm-4.5+39.g1aa6e5de/super-ddf.c new/mdadm-4.5+43.gdc69a22f/super-ddf.c --- old/mdadm-4.5+39.g1aa6e5de/super-ddf.c 2026-01-27 16:44:04.000000000 +0100 +++ new/mdadm-4.5+43.gdc69a22f/super-ddf.c 2026-02-23 17:40:44.000000000 +0100 @@ -33,6 +33,10 @@ #include <values.h> #include <stddef.h> +#include <sys/mman.h> +#include <unistd.h> +#include <errno.h> +#include <string.h> /* a non-official T10 name for creation GUIDs */ static char T10[] = "Linux-MD"; @@ -273,7 +277,7 @@ #define DDF_Missing 64 -#define SEARCH_BLOCK_SIZE 4096 +#define SEARCH_BLOCK_SIZE (1024 * 1024) #define SEARCH_REGION_SIZE (32 * 1024 * 1024) /* The content of the virt_section global scope */ @@ -893,83 +897,71 @@ static int search_for_ddf_headers(int fd, char *devname, unsigned long long *out) { - unsigned long long search_start; - unsigned long long search_end; - size_t bytes_block_to_read; unsigned long long dsize; - unsigned long long pos; - int bytes_current_read; - size_t offset; + unsigned long long search_start; + size_t map_len; /* real search(<= 32MB) */ - void *buffer = NULL; - be32 *magic_ptr = NULL; + long pagesz_l; + size_t pagesz; + unsigned long long map_off; /* mmap offset,align to page */ + size_t delta; /* search_start - map_off */ + size_t map_len_adj; /* mmaplength = delta + map_len */ + + void *map = MAP_FAILED; + unsigned char *p; int result = 0; - get_dev_size(fd, NULL, &dsize); + pagesz_l = sysconf(_SC_PAGESIZE); + pagesz = (pagesz_l > 0) ? (size_t)pagesz_l : 4096; + get_dev_size(fd, NULL, &dsize); + if (dsize == 0) { + pr_err("Device %s has size 0\n", + devname ? devname : "unknown"); + return -ENODEV; /* empty device / unknown size */ + } + if (dsize <= SEARCH_REGION_SIZE) + return 0; /* Size is inappropriate, though not erroneous. */ - /* Determine the search range */ - if (dsize > SEARCH_REGION_SIZE) - search_start = dsize - SEARCH_REGION_SIZE; - else - search_start = 0; + map_len = (size_t)SEARCH_REGION_SIZE; - search_end = dsize; - pos = search_start; + search_start = dsize - (unsigned long long)map_len; + /* mmap offset align to page */ + map_off = search_start & ~((unsigned long long)pagesz - 1ULL); + delta = (size_t)(search_start - map_off); - buffer = xmemalign(SEARCH_BLOCK_SIZE, SEARCH_BLOCK_SIZE); + /* [search_start, search_start + map_len) */ + map_len_adj = delta + map_len; - if (buffer == NULL) { - result = 1; - goto cleanup; + map = mmap(NULL, map_len_adj, PROT_READ, MAP_SHARED, fd, (off_t)map_off); + if (map == MAP_FAILED) { + pr_err("mmap for %s failed %d:%s\n", + fd2devnm(fd), errno, strerror(errno)); + return -ENOMEM; } - while (pos < search_end) { - /* Calculate the number of bytes to read in the current block */ - bytes_block_to_read = SEARCH_BLOCK_SIZE; - if (search_end - pos < SEARCH_BLOCK_SIZE) - bytes_block_to_read = search_end - pos; - - if (lseek(fd, pos, SEEK_SET) < 0) { - pr_err("lseek for %s failed %d:%s\n", - fd2devnm(fd), errno, strerror(errno)); - result = 2; - goto cleanup; - } + p = (unsigned char *)map + delta; - /*Read data from the device */ - bytes_current_read = read(fd, buffer, bytes_block_to_read); - - if (bytes_current_read <= 0) { - pr_err("Failed to read %s. %d:%s, Position=%llu, Bytes to read=%zu. Skipping.\n", - fd2devnm(fd), errno, strerror(errno), pos, bytes_block_to_read); - pos += SEARCH_BLOCK_SIZE; /* Skip to the next block */ - continue; - } + for (size_t i = 0; i + sizeof(be32) <= map_len; i += sizeof(be32)) { + be32 v; - /* Search for the magic value within the read block */ - for (offset = 0; - offset + sizeof(be32) <= (size_t)bytes_current_read; - offset += sizeof(be32)) { - - magic_ptr = (be32 *) ((char *)buffer + offset); - if (be32_eq(*magic_ptr, DDF_HEADER_MAGIC)) { - *out = pos + offset; - result = 0; - goto cleanup; - } + memcpy(&v, p + i, sizeof(v)); /* avoid unaligned access. */ + if (be32_eq(v, DDF_HEADER_MAGIC)) { + *out = search_start + (unsigned long long)i; + result = 0; + goto cleanup; } - - pos += SEARCH_BLOCK_SIZE; } + result = 0; /* Not found, returning normally.*/ cleanup: - free(buffer); + munmap(map, map_len_adj); return result; } + static int load_ddf_headers(int fd, struct ddf_super *super, char *devname) { /* @@ -1006,7 +998,7 @@ } } - if (!found_anchor) { + if (!found_anchor && conf_get_probing_ddf_extended()) { /* If not found, perform a full search for DDF headers */ ddffound = search_for_ddf_headers(fd, devname, &ddfpos); if (ddffound != 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mdadm-4.5+39.g1aa6e5de/super-intel.c new/mdadm-4.5+43.gdc69a22f/super-intel.c --- old/mdadm-4.5+39.g1aa6e5de/super-intel.c 2026-01-27 16:44:04.000000000 +0100 +++ new/mdadm-4.5+43.gdc69a22f/super-intel.c 2026-02-23 17:40:44.000000000 +0100 @@ -181,6 +181,7 @@ #define IMSM_T_RAID1 1 #define IMSM_T_RAID5 5 #define IMSM_T_RAID10 10 +#define IMSM_T_LEVEL_UNKNOWN 255 __u8 num_members; /* number of member disks */ __u8 num_domains; /* number of parity domains */ __u8 failed_disk_num; /* valid only when state is degraded */ @@ -5791,6 +5792,7 @@ } map->num_members = info->raid_disks; + map->raid_level = IMSM_T_LEVEL_UNKNOWN; update_imsm_raid_level(map, info->level); set_num_domains(map);
