All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@novell.com>
To: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Cc: xen-devel@lists.xensource.com, mats@planetcatfish.com
Subject: Re: [PATCH] Fix xm block/network-detach command
Date: Mon, 06 Aug 2007 18:52:59 -0600	[thread overview]
Message-ID: <46B7C26B.4080903@novell.com> (raw)
In-Reply-To: <46B394A4.5060708@novell.com> 7C7D82041F01Bkanno.masaki@jp.fujitsu.com

Masaki Kanno wrote:
<snip>
>> IMO, since xen itself now supports managed domains it should be possible
>> to independently change live and stored config. I should be able to feed
>> a starving domain but have it revert to default (define by me) settings
>> when reset. That said I think it will be considerable work, particularly
>> testing, to ensure this behavior across all resource types and xend
>> interfaces.
>>
>>     
>
> I also think the work to need an effort. 
> When we changed the resources configuration of domain by xm commands, 
> most resources configuration of domain is given to the reset domain 
> without change.  AFAIK, only CPU affinity revert to default.
>   

Right.

>> This changes behavior between block-attach and block-detach. In
>> block-detach, the device is removed from store and unplugged from domain
>> if live. For block-attach, the operation fails if domain is inactive. If
>> domain is active, device is plugged but not persisted to store.
>>
>>     
>
> I tried xm block/network-attach command with xen-unstable CS:15672. 
>   

Yep, sorry.  I tested this patch on a 3.1.0-based system missing your
earlier patch

http://xenbits2.xensource.com/xen-unstable.hg?rev/3196b63a7301

With both patches, block-[attach|detach] behave symmetrically.  I found
no problems testing your patch on c/s 15672.

A comment about the patch:

+
+    def convertToDeviceNumber(self, devid):
+        try:
+            dev = int(devid)
+        except ValueError:
+            # devid is not a number but a string containing either
+            # device name (e.g. xvda or xvda:disk) or
+            # device_type/device_id (e.g. vbd/51728)
+            dev = type(devid) is str and devid.split('/')[-1] or None
+            if dev == None:
+                return None
+            try:
+                dev = int(dev)
+            except ValueError:
+                dev = dev.split(':')[0]
+                dev = blkdev_name_to_number(dev)
+        return dev

Can this be pushed into the DevController?  Seems like the individual
device controllers would be best equipped to determine validity of a
deviceid.  That's what I was trying to do with this patch

http://lists.xensource.com/archives/html/xen-devel/2007-08/msg00038.html

which I see is now in the staging tree as c/s 15689.  BTW, there a two
xml files included in that c/s that were not part of the patch I
submitted :-).

Regards,
Jim

  parent reply	other threads:[~2007-08-07  0:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 20:48 [PATCH] Fix xm block/network-detach command Jim Fehlig
2007-08-06 11:52 ` Masaki Kanno
2007-08-07  0:52 ` Jim Fehlig [this message]
2007-08-07 10:38   ` Masaki Kanno
2007-08-07 10:40     ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2007-08-03  5:20 Masaki Kanno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46B7C26B.4080903@novell.com \
    --to=jfehlig@novell.com \
    --cc=kanno.masaki@jp.fujitsu.com \
    --cc=mats@planetcatfish.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.