Skip to contentSkip to conversation

'qemu-nbd' explicite flush to disk

Qemu-devel Mark Trumpold 2 participants 3 messages Oct 22, 2012 – Oct 24, 2012

lore
Share & tools
lore
#0 lore raw

Paolo,

Please recall you had sent me the link below to a kernel patch to allow 'qemu-nbd' to flush to disk. The patch was applied with good success.

However, recent testing indicates that filesystem corruption issue I am seeing seems to be tied to large (>500mbyte) filesystem writes. I also observe the kernel 'flush' thread approaching 100% cpu at times, and i/o wait % as reported by 'top' increasing sharply during the copy/write.

Was wondering if perhaps there are any special kernel config options that I may be missing for 'nbd', or any other information that might help.

Best regards,
Mark Trumpold

Quoted 32 lines

-----Original Message-----
From: Paolo Bonzini [mailto:[email protected]] On Behalf Of Paolo Bonzini
Sent: Wednesday, September 12, 2012 11:30 PM
To: Mark Trumpold
Cc: [email protected]
Subject: Re: 'qemu-nbd' explicite flush to disk
Il 12/09/2012 23:28, Mark Trumpold ha scritto:

Quoted 5 lines

So, I've been experimenting with 'qemu-nbd --cache=writeback ..' This nicely eliminates the 'checkpoint' issue; however, I have as yet been unable to explicitely flush things to disk -- which I would like to
do just before a 'nilfs' snapshot.

The Linux kernel driver for NBD does not support flushes. Patches were sent to the maintainer, but he never applied them.
You can get them at
http://thread.gmane.org/gmane.linux.drivers.nbd.general/1108 and try them.

Quoted 2 lines

Subsequently I've been trying to call 'bdrv_co_flush(bs)' directly, but I can't

figure out how to dereference 'bs' for the call.

Quoted 10 lines

I'm probably out in the weeds on this one.
Any guidance would be greatly appreciated.

I am running:

    qemu-1.2.0
    linux kernel 3.3.1

Thank you,
Mark Trumpold

#1 lore raw

Hello Paolo,

Before anyone expends any cycles on my last message, I have new information.

Today I was able to eliminate the file corruption issue by doing a 'blockdev --flushbufs' prior to taking a snapshot. I haven't done extensive testing yet, but it seems the issue if gone at this point.

So sorry for the disruption.

Best regards,
Mark Trumpold

Quoted 50 lines · Mark Trumpold

Paolo,

Please recall you had sent me the link below to a kernel patch to allow 'qemu-nbd' to flush to disk. The patch was applied with good success.

However, recent testing indicates that filesystem corruption issue I am seeing seems to be tied to large (>500mbyte) filesystem writes. I also observe the kernel 'flush' thread approaching 100% cpu at times, and i/o wait % as reported by 'top' increasing sharply during the copy/write.

Was wondering if perhaps there are any special kernel config options that I may be missing for 'nbd', or any other information that might help.

Best regards,
Mark Trumpold

Quoted 33 lines

-----Original Message-----
From: Paolo Bonzini [mailto:[email protected]] On Behalf Of Paolo Bonzini
Sent: Wednesday, September 12, 2012 11:30 PM
To: Mark Trumpold
Cc: [email protected]
Subject: Re: 'qemu-nbd' explicite flush to disk
Il 12/09/2012 23:28, Mark Trumpold ha scritto:

Quoted 5 lines

So, I've been experimenting with 'qemu-nbd --cache=writeback ..' This nicely eliminates the 'checkpoint' issue; however, I have as yet been unable to explicitely flush things to disk -- which I would like to
do just before a 'nilfs' snapshot.

The Linux kernel driver for NBD does not support flushes. Patches were sent to the maintainer, but he never applied them.
You can get them at
http://thread.gmane.org/gmane.linux.drivers.nbd.general/1108 and try them.

Quoted 3 lines

Subsequently I've been trying to call 'bdrv_co_flush(bs)' directly, but
I can't

figure out how to dereference 'bs' for the call.

Quoted 10 lines

I'm probably out in the weeds on this one.
Any guidance would be greatly appreciated.

I am running:

    qemu-1.2.0
    linux kernel 3.3.1

Thank you,
Mark Trumpold

#2 lore raw

Il 23/10/2012 04:50, Mark Trumpold ha scritto:

Quoted 7 lines

Hello Paolo,

Before anyone expends any cycles on my last message, I have new information.

Today I was able to eliminate the file corruption issue by doing a 'blockdev --flushbufs' prior to taking a snapshot.

Makes sense. Even better, you could do fsfreeze -f before and fsfreeze -u afterwards.

Paolo