diff options
author | Neil Brown <neilb@suse.de> | 2006-10-19 16:38:29 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-10-19 16:38:29 +1000 |
commit | 702b557b1c902e19cc2a157d53f66dcf73662da4 (patch) | |
tree | 1de445a67327d4d04ec96878f6de8030e4b957ec /Create.c | |
parent | 26a0b8fd7a80419662c0171b91e95e5057af598e (diff) | |
download | mdadm-702b557b1c902e19cc2a157d53f66dcf73662da4.tar.gz mdadm-702b557b1c902e19cc2a157d53f66dcf73662da4.tar.xz mdadm-702b557b1c902e19cc2a157d53f66dcf73662da4.zip |
Fix bugs related to raid10 and the new offset layout.
Need to mask of bits above the bottom 16 when calculating number of
copies.
Diffstat (limited to 'Create.c')
-rw-r--r-- | Create.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -363,7 +363,7 @@ int Create(struct supertype *st, char *mddev, int mdfd, * which is array.size * raid_disks / ncopies; * .. but convert to sectors. */ - int ncopies = (layout>>8) * (layout & 255); + int ncopies = ((layout>>8) & 255) * (layout & 255); bitmapsize = (unsigned long long)size * raiddisks / ncopies * 2; /* printf("bms=%llu as=%d rd=%d nc=%d\n", bitmapsize, size, raiddisks, ncopies);*/ } else |