Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/raidframe



On Thu, Jan 12, 2017 at 11:22:16PM -0500, Christos Zoulas wrote:
> +rf_handle_hosed(RF_Raid_t *raidPtr, RF_Config_t *cfgPtr, int hosed_column)
> +{
:
> +	if (raidPtr->Disks[hosed_column].status == rf_ds_failed)
> +		return;

equivalent to
if (raidPtr->Disks[hosed_column].status != rf_ds_failed) {
	do stuff

This is not in the first part:
> -			printf("Hosed component: %s\n",
> -			       &cfgPtr->devnames[0][hosed_column][0]);
> -			if (!force) {
> -				/* we'll fail this component, as if there are
> -				   other major errors, we arn't forcing things
> -				   and we'll abort the config anyways */
> -				raidPtr->Disks[hosed_column].status
> -					= rf_ds_failed;
> -				raidPtr->numFailures++;
> -				raidPtr->status = rf_rs_degraded;
> -			}
> +			if (hosed_column != -1)
> +				rf_handle_hosed(raidPtr, cfgPtr, hosed_column);

It is only in the second part:
> -			printf("Hosed component: %s\n",
> -			       &cfgPtr->devnames[0][hosed_column][0]);
> -			if (!force) {
> -				/* we'll fail this component, as if there are
> -				   other major errors, we arn't forcing things
> -				   and we'll abort the config anyways */
> -				if (raidPtr->Disks[hosed_column].status != rf_ds_failed) {
> -					raidPtr->Disks[hosed_column].status
> -						= rf_ds_failed;
> -					raidPtr->numFailures++;
> -					raidPtr->status = rf_rs_degraded;
> -				}
> -			}
> +			if (hosed_column != -1)
> +				rf_handle_hosed(raidPtr, cfgPtr, hosed_column);

I didn't want to commit it because it introduces a functional
change. Now if the status was failed from long before, we will
not increment numFailures, so numFailures > 1 is probably not
possible.


Home | Main Index | Thread Index | Old Index