Re: [PATCH 01/14] multipathd: return if dm_get_major_minor failed in, cli_add_map

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

 




On 2020/9/4 1:26, Martin Wilck wrote:
> 
> Why not just quit the "do" loop in the error case
> for dm_get_major_minor()?
> 
> Martin

If dm_get_major failed at first time, it will be executed again
for some reason I don't know in the original code. Quiting the
"do" loop in the error case for dm_get_major_minor() is against
the twice attempt rule.

Lixiaokeng
> 
>>  		else {
>>  			sprintf(dev_path, "dm-%d", minor);
>>  			alias = dm_mapname(major, minor);
>> +			if (!alias)
>> +				condlog(2, "%s: mapname not found for
>> %d:%d",
>> +					param, major, minor);
>>  		}
>>  		/*if there is no mapname found, we first create the
>> device*/
>>  		if (!alias && !count) {
>> -			condlog(2, "%s: mapname not found for %d:%d",
>> -				param, major, minor);
>>  			get_refwwid(CMD_NONE, param, DEV_DEVMAP,
>>  				    vecs->pathvec, &refwwid);
>>  			if (refwwid) {
> 
> 
> 
> .
> 

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux