Re: [Xen-devel] [PATCH 1/1] tools/hotplug: Scan xenstore once when attaching shared images files

2015-10-01 Thread Mike Latimer
Hi George, On Thursday, October 01, 2015 10:51:08 AM George Dunlap wrote: > >then > > -echo 'local' > > +echo "local $d" > > return > >fi > > fi > > @@ -90,13 +107,13 @@ check_sharing() > > do > >d=$(xenstore_read_default

Re: [Xen-devel] [PATCH 1/1] tools/hotplug: Scan xenstore once when attaching shared images files

2015-10-01 Thread Mike Latimer
Hi again, On Thursday, October 01, 2015 10:51:08 AM George Dunlap wrote: > > > > - if [ "$d" = "$devmm" ] > > + if [[ "$devmm" == *"$d,"* ]] > > Style nit: using [[ instead of [. TBH I prefer [[, but it's probably > better to be consistent with the rest of the file. I was about to

Re: [Xen-devel] [PATCH 1/1] tools/hotplug: Scan xenstore once when attaching shared images files

2015-10-01 Thread George Dunlap
On 01/10/15 16:16, Mike Latimer wrote: > Hi again, > > On Thursday, October 01, 2015 10:51:08 AM George Dunlap wrote: >>> >>> - if [ "$d" = "$devmm" ] >>> + if [[ "$devmm" == *"$d,"* ]] >> >> Style nit: using [[ instead of [. TBH I prefer [[, but it's probably >> better to be

Re: [Xen-devel] [PATCH 1/1] tools/hotplug: Scan xenstore once when attaching shared images files

2015-10-01 Thread George Dunlap
CC'ing relevant maintainers, and someone who's worked with block scripts before... On Wed, Sep 30, 2015 at 10:10 PM, Mike Latimer wrote: > Create the list of shared loopback devices from within check_sharing, rather > than calling check_sharing for every loopback device using

Re: [Xen-devel] [PATCH 1/1] tools/hotplug: Scan xenstore once when attaching shared images files

2015-10-01 Thread George Dunlap
On Thu, Oct 1, 2015 at 10:51 AM, George Dunlap wrote: > CC'ing relevant maintainers, and someone who's worked with block > scripts before... > > On Wed, Sep 30, 2015 at 10:10 PM, Mike Latimer wrote: >> Create the list of shared loopback devices

[Xen-devel] [PATCH 1/1] tools/hotplug: Scan xenstore once when attaching shared images files

2015-09-30 Thread Mike Latimer
Create the list of shared loopback devices from within check_sharing, rather than calling check_sharing for every loopback device using the same shared image. This change prevents the xenstore database from being walked for every shared device, which causes an exponential decrease in performance.