qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] 'qemu-nbd' explicite flush to disk


From: Mark Trumpold
Subject: [Qemu-discuss] 'qemu-nbd' explicite flush to disk
Date: Mon, 10 Sep 2012 18:35:40 -0700

Hello,

I am experimenting with the '-cache=writeback' feature of Qemu version 1.2.0.  
I am using 'qcow2' loop images on top of a 'nilfs' filesystem (for snapshots).  
The default Qemu mode (with no '-cache' option) keeps data flushed to disk, but 
creates excessive 'nilfs' checkpoints - based on the Qemu synchronous writes.

The Qemu '-cache=writeback' alleviates the excessive checkpoint symptom with 
'nilfs', however I am having trouble explicitly flushing data to disk before 
taking a 'nilfs' snapshot.

'qemu-nbd -d /dev/nbdx' disconnects my Qemu image and things get flushed to 
disk, but in my case I don't want to disconnect before snapshotting.  I've 
tried the following in the 'ndb.c' which is similar to the 'disconnect' 
function (this doesn't work):

        int nbd_flush(int fd)
        {
              ioctl(fd, NBD_CLEAR_QUE);
              ioctl(fd, NBD_CLEAR_SOCK);
              return 0;
         }
         int nbd_disconnect(int fd)
         {
               ioctl(fd, NBD_CLEAR_QUE);
               ioctl(fd, NBD_DISCONNECT);
               ioctl(fd, NBD_CLEAR_SOCK);
               return 0;
         }

I've also been reading in your forum that the "bdrv_co_flush" might be an 
option, but I am not sure how to interface with it.

Any advice would be greatly appreciated.

Thank you,
Mark Trumpold


Confidentiality Notice:  The information contained in this electronic e-mail 
and any accompanying attachment(s) is intended only for the use of the intended 
recipient and is confidential and/or privileged. If you and we have a 
confidentiality agreement or other non-disclosure obligations between us, this 
Notice shall be deemed to mark and identify the content of this email and any 
attachments as confidential and proprietary.   If any reader of this 
communication is not the intended recipient, unauthorized use, disclosure or 
copying is strictly prohibited, and may be unlawful.  If you have received this 
communication in error, please immediately notify the sender by return e-mail, 
and delete the original message and all copies from your system.  Thank you.

IRS Circular 230 Disclosure: To ensure compliance with requirements imposed by 
the IRS, please be advised that any U.S. federal tax advice contained in this 
communication (including any attachments) is not intended or written to be used 
or relied upon, and cannot be used or relied upon, for the purpose of (i) 
avoiding penalties under the Internal Revenue Code, or (ii) promoting, 
marketing or recommending to another party any transaction or matter addressed 
herein.

E-mail is susceptible to data corruption, interception, unauthorized amendment, 
tampering and viruses, and we only send and receive e-mails on the basis that 
we are not liable for any such corruption, interception, amendment, tampering 
or viruses or any consequences thereof.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]