WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Block script unsafe when starting multiple devices in pa

To: Nathan March <nathan@xxxxxx>
Subject: Re: [Xen-devel] Block script unsafe when starting multiple devices in parallel
From: Marek Marczykowski <marmarek@xxxxxxxxxxxx>
Date: Tue, 30 Aug 2011 20:32:28 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 30 Aug 2011 11:33:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E5D1FCA.7010104@xxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4E5D1FCA.7010104@xxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.11
On 30.08.2011 19:37, Nathan March wrote:
> Hi Guys,
> 
> Ran into an issue where losetup was failing, added some logging to it's
> executions to see (first #'s are parent pid / pid):
> 
> 32435 / 32438 - losetup -f
> 32436 / 32439 - losetup -f
> 32435 / 32438 -  Exit code: 0
> 32435 / 32438 -  Output: /dev/loop/10
> 32436 / 32439 -  Exit code: 0
> 32436 / 32439 -  Output: /dev/loop/10
> 32128 / 32451 - losetup /dev/loop/10 /mnt/xenDisks2/nathanxen2/backup_tmp
> 31934 / 32452 - losetup /dev/loop/10 /mnt/xenDisks1/nathanxen2/swap
> 
> Sometime's losetup seems to be stuck waiting on something else and since
> multiple block devices are brought up in parallel, the block script
> tries to use the same name for multiple loopback devices.

This should be prevented by locking mechanism (claim_lock /
release_lock), but it isn't working in some cases
(http://lists.xensource.com/archives/html/xen-devel/2011-07/msg00182.html).

I've workarounded it with wrapping this script with flock (in udev rules).

Perhaps it can be done in tools/hotplug/Linux/xen-backend.rules instead
of using claim_lock/release_lock? This is much simpler than
restructuring all hotplug scripts...

-- 
Pozdrawiam / Best Regards,
Marek Marczykowski         | RLU #390519
marmarek at mimuw edu pl   | xmpp:marmarek at staszic waw pl

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>