From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Zhen Subject: Re: problem about changing state to XenbusStateClosed resulting in vbd entry removed from xenstore Date: Fri, 19 May 2006 23:37:28 +0800 Message-ID: <446DE638.3010203@Sun.COM> References: <446CA038.2080009@Sun.COM> <20060518230034.GE30245@leeni.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Content-Transfer-Encoding: 7BIT Return-path: In-reply-to: <20060518230034.GE30245@leeni.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ewan Mellor Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>+ Is there any other way to flush all the I/O to the disk? >>Currently, the only way to flush the I/Os is to change the frontend >>state to XenbusStateClosed. >>Since changing the state to XenbusStateClosed is a dangerous thing to do >>(cause all the vbd interface information to be removed), I cannot just >>flush the I/O, while keep the frontend and backend connected. >>Could there be any new state or command to do that? >> >> > >A block-detach should be switching the backend to XenbusStateClosing, which >the frontend will observe, allowing it to flush remaining I/O. Only when the >frontend is done should it switch to Closed, which will then be seen by the >backend and then the backend can finish up and close itself. > >Are you not seeing this? > > Yes, I've seen this. But, the key point is that how to flush the I/O without disconnecting between frontend and backend. It seems to me that I/O flushing is more like a command, say, BLKIF_OP_FLUSH, than changing the driver to various states, especially XenbusStateClosing/Closed. Any idea? Thanks, Max >Cheers, > >Ewan. > >