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] Re: [PATCH] hotplug: allow hardlinked files for block de

To: Olaf Hering <olaf@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] hotplug: allow hardlinked files for block device images
From: Keir Fraser <keir@xxxxxxx>
Date: Sun, 16 Jan 2011 15:14:46 +0000
Cc: ian.jackson@xxxxxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Sun, 16 Jan 2011 07:15:52 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=HZwRRh0myhe0N8OCPjPE+iBtg+/23KDCu0T0ChYBOlQ=; b=hzbfbAo0zXKiBHFCqAGRwAC2d+j7E1fAQWE6J7wkaXxyyZ2UH/w2NtrcTNh8AQTZen zmQv2YgePMcTGWJWHcYQExhShSFhKeu5BLtel6zWgNiOEeDVdTMwiP+C61OqQ2MxiWGI c1d0d6AeGf3pkPoHKSUdEjZuO9TnLVjCMlhCw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=lqFyBv+7BTEQ5PtexBQgKW4vZ8rfpAZdW1RDtRY1sW9F1RUsaagpANc1OZ1GcAy77a L4o1IIRd7DzFaW3ao2meS3LPCiXbG8MBduqzYYyGiA3cIDCfevcCPHIvW/T+Rlk/a7WG 0vgyFQxTj6JZeOfkB9t4PcFnhdbnWu/eZGZSk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110116144331.GA11922@xxxxxxxxx>
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
Thread-index: Acu1kBwBXV5Iz6kVDEO37/BB0yXZcw==
Thread-topic: [Xen-devel] Re: [PATCH] hotplug: allow hardlinked files for block device images
User-agent: Microsoft-Entourage/12.28.0.101117
Needs an Ack, or to be applied, by a tools maintainer.

 -- Keir

On 16/01/2011 14:43, "Olaf Hering" <olaf@xxxxxxxxx> wrote:

> 
> Ping?
> 
> 
> On Fri, Nov 26, Olaf Hering wrote:
> 
>> tools/hotplug/Linux/block change for this losetup -a output:
>> (inode 12 is listed twice due to hardlinks)
>> 
>> /dev/loop0: [0809]:139267 (/abuild/vdisk-sles11_2-disk0)
>> /dev/loop1: [0809]:139266 (/abuild/vdisk-sles11_1-disk1)
>> /dev/loop3: [0809]:139267 (/abuild/vdisk-sles11_2-disk0)
>> /dev/loop5: [0809]:139273 (/abuild/vdisk-sles11_5-disk1)
>> /dev/loop8: [0809]:12 (/abuild/bootiso-xenpaging-sles11_5.iso)
>> /dev/loop10: [0809]:12 (/abuild/bootiso-xenpaging-sles11_4.iso)
>> /dev/loop11: [0809]:139271 (/abuild/vdisk-sles11_4-disk0)
>> 
>> Without this change, $dev would contain /dev/loop8\n/dev/loop10
>> Applies to 4.0 and 4.1
>> 
>> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
>> 
>> ---
>>  tools/hotplug/Linux/block |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> --- xen-4.0.1-testing.orig/tools/hotplug/Linux/block
>> +++ xen-4.0.1-testing/tools/hotplug/Linux/block
>> @@ -279,8 +279,8 @@ mount it read-write in a guest domain."
>>              fatal "Unable to lookup $file: dev: $dev inode: $inode"
>>            fi
>>  
>> -          shared_list=$(losetup -a | grep ' \[0*'${dev}'\]:'${inode} |
>> -                cut -d : -f 1)
>> +          shared_list=$(losetup -a |
>> +                sed -n -e
>> "s@^\([^:]\+\)\(:[[:blank:]]\[${dev}\]:${inode}[[:blank:]](${file})\)@\1@p" )
>>            for dev in "$shared_list"
>>            do
>>              if [ -n "$dev" ]
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel