|
|
e9b2a3 |
---
|
|
|
e9b2a3 |
iprutils/iprconfig.c | 14 +++-----------
|
|
|
e9b2a3 |
1 file changed, 3 insertions(+), 11 deletions(-)
|
|
|
e9b2a3 |
|
|
|
e9b2a3 |
Index: b/iprutils/iprconfig.c
|
|
|
e9b2a3 |
===================================================================
|
|
|
e9b2a3 |
--- a/iprutils/iprconfig.c 2014-01-31 17:18:38.000000000 -0600
|
|
|
e9b2a3 |
+++ b/iprutils/iprconfig.c 2014-01-31 17:22:35.847766342 -0600
|
|
|
e9b2a3 |
@@ -3847,6 +3847,8 @@ int confirm_raid_start(i_container *i_co
|
|
|
e9b2a3 |
rc = ipr_start_array_protection(ioa,
|
|
|
e9b2a3 |
cur_raid_cmd->stripe_size,
|
|
|
e9b2a3 |
cur_raid_cmd->prot_level);
|
|
|
e9b2a3 |
+ if (rc)
|
|
|
e9b2a3 |
+ return RC_19_Create_Fail;
|
|
|
e9b2a3 |
}
|
|
|
e9b2a3 |
|
|
|
e9b2a3 |
rc = raid_start_complete();
|
|
|
e9b2a3 |
@@ -13297,7 +13299,7 @@ static int format_for_raid(char **args,
|
|
|
e9b2a3 |
static int raid_create(char **args, int num_args)
|
|
|
e9b2a3 |
{
|
|
|
e9b2a3 |
int i, num_devs = 0, rc;
|
|
|
e9b2a3 |
- int hdd_count = 0, ssd_count = 0, non_4k_count = 0, is_4k_count = 0;
|
|
|
e9b2a3 |
+ int non_4k_count = 0, is_4k_count = 0;
|
|
|
e9b2a3 |
int next_raid_level, next_stripe_size, next_qdepth;
|
|
|
e9b2a3 |
char *raid_level = IPR_DEFAULT_RAID_LVL;
|
|
|
e9b2a3 |
int stripe_size, qdepth, zeroed_devs;
|
|
|
e9b2a3 |
@@ -13355,22 +13357,12 @@ static int raid_create(char **args, int
|
|
|
e9b2a3 |
return -EINVAL;
|
|
|
e9b2a3 |
}
|
|
|
e9b2a3 |
|
|
|
e9b2a3 |
- if (dev->block_dev_class & IPR_SSD)
|
|
|
e9b2a3 |
- ssd_count++;
|
|
|
e9b2a3 |
- else
|
|
|
e9b2a3 |
- hdd_count++;
|
|
|
e9b2a3 |
-
|
|
|
e9b2a3 |
if (dev->block_dev_class & IPR_BLK_DEV_CLASS_4K)
|
|
|
e9b2a3 |
is_4k_count++;
|
|
|
e9b2a3 |
else
|
|
|
e9b2a3 |
non_4k_count++;
|
|
|
e9b2a3 |
}
|
|
|
e9b2a3 |
|
|
|
e9b2a3 |
- if (hdd_count > 0 && ssd_count > 0) {
|
|
|
e9b2a3 |
- syslog(LOG_ERR, _("SSDs and HDDs can not be mixed in an array.\n"));
|
|
|
e9b2a3 |
- return -EINVAL;
|
|
|
e9b2a3 |
- }
|
|
|
e9b2a3 |
-
|
|
|
e9b2a3 |
if (is_4k_count > 0 && non_4k_count > 0) {
|
|
|
e9b2a3 |
syslog(LOG_ERR, _("4K disks and 5XX disks can not be mixed in an array.\n"));
|
|
|
e9b2a3 |
return -EINVAL;
|