summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-10-19 16:38:29 +1000
committerNeil Brown <neilb@suse.de>2006-10-19 16:38:29 +1000
commit702b557b1c902e19cc2a157d53f66dcf73662da4 (patch)
tree1de445a67327d4d04ec96878f6de8030e4b957ec /util.c
parent26a0b8fd7a80419662c0171b91e95e5057af598e (diff)
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 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 97707d0d..8d06848e 100644
--- a/util.c
+++ b/util.c
@@ -179,7 +179,7 @@ int enough(int level, int raid_disks, int layout,
/* This is the tricky one - we need to check
* which actual disks are present.
*/
- copies = (layout&255)* (layout>>8);
+ copies = (layout&255)* ((layout>>8) & 255);
first=0;
do {
/* there must be one of the 'copies' form 'first' */