[Devel] [PATCH rh7] ms/md: allow creation of mdNNN arrays via md_mod/parameters/new_array

Andrey Ryabinin aryabinin at virtuozzo.com
Wed Sep 19 17:34:46 MSK 2018



On 09/19/2018 12:13 PM, Kirill Tkhai wrote:
> On 17.09.2018 14:45, Andrey Ryabinin wrote:

>>  		spin_unlock(&all_mddevs_lock);
>>  	}
>> +	if (name && dev)
>> +		/*
>> +		 * Creating /dev/mdNNN via "newarray", so adjust hold_active.
>> +		 */
>> +		mddev->hold_active = UNTIL_STOP;
> 
> This is dead code in both mainstream and our kernel. Very strange. Function md_alloc()
> is never called with both name and dev arguments are set.
> 
> What is this needed for? Shouldn't there be (!name && dev) since this is the "newarray"?


True, I agree it seems like (judging from code and the comment) it should be (!name && dev).
Care to send a patch?


> 
> Kirill
> 


More information about the Devel mailing list