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

[Xen-devel] Block script unsafe when starting multiple devices in parall

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Block script unsafe when starting multiple devices in parallel
From: Nathan March <nathan@xxxxxx>
Date: Tue, 30 Aug 2011 10:37:14 -0700
Delivery-date: Tue, 30 Aug 2011 10:37:49 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=gt.net; h=message-id:date :from:mime-version:to:subject:content-type; s=mail; bh=8dpvlZVm+ FXWtgNINdFwxygY7oU=; b=Wg4B16DMeXth+eLW2TAzHgA3S80U5LBGg4ht9SjfF TeU141hGfsns6DghVIq+Vg8VnLk+/Q+8697fdFAOubSECDmh9vBvxNwadK1cRKbb sdBKHVX6rx1gEcUbHeB75LaGmYOazVmjySfuJyHSDhH+iB3muCg4eyg/TCpIWeH8 BY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gt.net; h=message-id:date :from:mime-version:to:subject:content-type; q=dns; s=mail; b=YJV trYf13rokwMtBRf1P0qnvbXKy9z5Xzn0r4+4b2vn5vwfLh83x7XDRD2ZmGsXjYy0 HDIre9V4t//GL+60V1ScS0FLijF0YreOd1Ky71lXXJyXPkCSayOfCt1NzcjML+ED fyef31oC5a9b5q9qV9FWnM6538OKSHbcD7r+ueog=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20110817 Thunderbird/7.0
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.

Fix for this is pretty straightforward - should just be letting losetup figure out the device names itself, patch is attached.

- Nathan

--
Nathan March<nathan@xxxxxx>
Gossamer Threads Inc. http://www.gossamer-threads.com/
Tel: (604) 687-5804 Fax: (604) 687-5806

Attachment: block.patch
Description: Text document

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