diff options
author | Mike Lovell <mlovell@bluehost.com> | 2016-05-18 20:23:14 +0200 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@redhat.com> | 2016-06-03 21:36:11 +0200 |
commit | 2e466cce45ac2397ea426a765c829c621901664b (patch) | |
tree | 188d2b9791b459485ebee2d3b7d5a14ba1a1fad7 /mdopen.c | |
parent | Use dev_t for devnm2devid and devid2devnm (diff) | |
download | mdadm-2e466cce45ac2397ea426a765c829c621901664b.tar.xz mdadm-2e466cce45ac2397ea426a765c829c621901664b.zip |
Change behavior in find_free_devnm when wrapping around.
Newer kernels don't allow for specifying an array larger than 511. This
makes it so find_free_devnm wraps to 511 instead of 2^20 - 1.
Signed-off-by: Mike Lovell <mlovell@bluehost.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Diffstat (limited to 'mdopen.c')
-rw-r--r-- | mdopen.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -439,7 +439,7 @@ char *find_free_devnm(int use_partitions) static char devnm[32]; int devnum; for (devnum = 127; devnum != 128; - devnum = devnum ? devnum-1 : (1<<20)-1) { + devnum = devnum ? devnum-1 : (1<<9)-1) { if (use_partitions) sprintf(devnm, "md_d%d", devnum); |