[Drbd-dev] Re: your mail

Lars Ellenberg lars.ellenberg at linbit.com
Sat Jul 21 16:24:08 CEST 2007


On Thu, Jul 19, 2007 at 08:09:41PM +0800, lihua wrote:
> drbd-dev,
>     I have a Qs in function ensure_mdev in  drbd_nl.c
>     minor_to_mdev ensure mdev exist.
>     If it not exist ,we may create a device .Thus ,minor_table[nlp->drbd_minor] == NULL and mdev = NULL.
>     So :
> 
>             if(mdev){
>                 ......
>             } 
>     can't perform forever.
>     Is my mean right?
>                             2007-7月-日 

the inner part is only to avoid a race condition in case two commands
try to create the same device at the same time. it won't loop.


-- 
: Lars Ellenberg                            Tel +43-1-8178292-0  :
: LINBIT Information Technologies GmbH      Fax +43-1-8178292-82 :
: Vivenotgasse 48, A-1120 Vienna/Europe    http://www.linbit.com :


More information about the drbd-dev mailing list