From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 21 Jul 2007 16:24:08 +0200 From: Lars Ellenberg To: lihua Message-ID: <20070721142408.GB6130@mail.linbit.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: drbd-dev Subject: [Drbd-dev] Re: your mail List-Id: Coordination of development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 :