From: Daniel Stodden <daniel.stodden@citrix.com>
To: Jan Beulich <jbeulich@novell.com>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
"jaxboe@fusionio.com" <jaxboe@fusionio.com>,
"annie.li@oracle.com" <annie.li@oracle.com>,
"joe.jin@oracle.com" <joe.jin@oracle.com>,
"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>,
"KURT.HACKEL@oracle.com" <KURT.HACKEL@oracle.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"greg.marsden@oracle.com" <greg.marsden@oracle.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH 0/3] xen-blkback: refactor vbd remove/disconnect.
Date: Wed, 3 Aug 2011 13:38:32 -0700 [thread overview]
Message-ID: <1312403912.2513.374.camel@agari.van.xensource.com> (raw)
In-Reply-To: <4E396F090200007800073F59@nat28.tlf.novell.com>
On Wed, 2011-08-03 at 10:53 -0400, Jan Beulich wrote:
> >>> Joe Jin 08/03/11 4:10 AM >>>
> >1. start guest with the latest kernel.
> >2. attach new block device by xm block-attach in Dom0
> >3. mount new disk in guest
> >4. execute xm block-detach to detach the block device in dom0 until timeout
Doesn't this fail immediately in userland right now? The disconnect
attempt (blkback switching to Closing) will be acknowledged with an
error, so you'd watch backend and frontend state simultaneously.
>From there on, there might be options. Could switch back to Connected
and call it a day, but that's currently nowhere exercised, so not sure
if it's fully stable.
But the behavior established in XCP is to bail out, but leave the
backend at Closing. That means from the backend perspective, the VBD
will unplug and get cleaned up at an unspecific later point in time. But
stay operational.
Note that the latter takes udev work, to finally clean up attached disk
images after completion.
> >5. try to unmount the disk in guest, umount hung. at here, any IOs to the
> >device will hang.
Yeah, not so good. That's what --force would imply.
> A bogus sequence of operations - an operator in Dom0 shouldn't remove
> a device that is still in use in a guest, except as an exceptionasl measure
> (and then other bad behavior is to be expected). What's the use case?
The administrative perspective is right, but it's a valid one. And even
if you're coordinating dom0 unplug with guest umount -- there needs a
way to handly buggy coordination.
We don't have guest usage indication in the frontend record, so backends
resort to try/error instead.
I think try/error is the way to deal with it. Transaction stuff
necessary to synch a front/back-coordinated disconnect seems over the
top, and we'd probably want compat behavior anyway.
Not sure what xm/xl can or wants to do about delayed detaches. If it
sounds undesirable, we probably want to consider patch to blkback to
abort shutdown-request and flip back to Connected.
So a controller would try in sync, fail in sync, and rolls back. So it
won't have to deal with backend detach later. Sounds simpler. I don't
think there's really a particular reason XCP chose to behave the way it
does, except low hanging fruit.
Not convinced it doesn't need transactions either, because you could see
the tool/blkback interaction race blkback/blkfront driven by guest
umount. But it may yield a simpler UI.
Please correct me where my lack of OSS toolstack understanding
struck. :)
Daniel
prev parent reply other threads:[~2011-08-03 20:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-03 14:53 Jan Beulich
2011-08-03 20:38 ` Daniel Stodden [this message]
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=1312403912.2513.374.camel@agari.van.xensource.com \
--to=daniel.stodden@citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=KURT.HACKEL@oracle.com \
--cc=annie.li@oracle.com \
--cc=greg.marsden@oracle.com \
--cc=jaxboe@fusionio.com \
--cc=jbeulich@novell.com \
--cc=joe.jin@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®