[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] 'qemu-nbd' explicit flush
From: |
Mark Trumpold |
Subject: |
Re: [Qemu-devel] 'qemu-nbd' explicit flush |
Date: |
Wed, 22 May 2013 16:10:56 +0000 |
Thank you guys for responding!!
>
> > 1. Add a signal handler (like SIGHUP or SIGUSR1) to qemu-nbd which
> > flushes all exports.
>
> That would be a useful addition anyway.
>
> Paolo
This is exactly what I was going to try today. I'm just getting familiar with
Qemu source.
I'll let you know how it goes..
Thanks again Paolo and Stefan.
Regards,
Mark Trumpold
-----Original Message-----
From: Paolo Bonzini [mailto:address@hidden
Sent: Wednesday, May 22, 2013 04:07 AM
To: 'Stefan Hajnoczi'
Cc: 'Mark Trumpold', address@hidden, address@hidden
Subject: Re: 'qemu-nbd' explicit flush
Il 22/05/2013 11:47, Stefan Hajnoczi ha scritto:
> On Tue, May 21, 2013 at 08:01:10PM +0000, Mark Trumpold wrote:
>> Linux kernel 3.3.1 with Qemu patch to enable kernel flushing:
>> http://thread.gmane.org/gmane.linux.drivers.nbd.general/1108
>
> Did you check that the kernel is sending NBD_FLUSH commands? You can
> use tcpdump and then check the captured network traffic.
>
>> Usage example:
>> 'qemu-nbd --cache=writeback -c /dev/nbd0 /images/my-qcow.img'
>> 'mount /dev/nbd0 /my-mount-point'
>>
>> Everything does flush correctly when I first unmount and then disconnect the
>> device; however, in my case I am not able to unmount things before
>> snapshotting.
>>
>> I tried several approaches externally to flush the device. For example:
>> 'mount -o remount,ro /dev/nbd0'
>> 'blockdev --flushbufs /dev/nbd0'
>
> Did you try plain old sync(1)?
This could also work:
dd if=/dev/zero of=dummy oflag=sync bs=512 count=1
> 1. Add a signal handler (like SIGHUP or SIGUSR1) to qemu-nbd which
> flushes all exports.
That would be a useful addition anyway.
Paolo