That is probably because with cache=writeback write-behind is exercised which can give a huge boost in performance. I am suspecting that a recent commit in write-behind might have broken something. Using write-behind should be safe for normal operation.<br>
<br><div class="gmail_quote">On Tue, Aug 7, 2012 at 2:31 AM, Jules Wang <span dir="ltr"><<a href="mailto:lancelotds@163.com" target="_blank">lancelotds@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.7;font-size:14px;font-family:arial">hi, Anand:<br> Another question on "writeback" is: I observe disk performance boost(40x)(using IOMeter in VM) when setting cache=writeback in comparsion with cache=none or writethrough. <div>
<div> Do you have any ideas about that? :-)</div><div><br></div><div>Best Regards.</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">Jules Wang</font></span><div>
<div class="h5"><br><div> <br><div></div><div></div><br>At 2012-08-07 15:10:30,"Anand Avati" <<a href="mailto:anand.avati@gmail.com" target="_blank">anand.avati@gmail.com</a>> wrote:<br> <blockquote style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">
cache=writeback should not be necessary (including disabling write-behind). This is clearly a bug. We are looking into it.<br><br><div class="gmail_quote">On Mon, Aug 6, 2012 at 11:51 PM, Jules Wang <span dir="ltr"><<a href="mailto:lancelotds@163.com" target="_blank">lancelotds@163.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;font-size:14px;font-family:arial">Bharata:<div> Alternatively,You could add ",cache=writeback" after "if=virtio".</div>
<div> Good Luck.</div><div><br></div><div>Best Regards.</div><div>Jules Wang</div><div><div></div><div></div><br><pre><br>At <a href="tel:2012-08-07%C2%A014" value="+12012080714" target="_blank">2012-08-07 14</a>:29:38,"Bharata B Rao" <<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a>> wrote:
>Hi,
>
>With latest QEMU and latest gluster git, I observe guest root
>filesystem corruption when the VM boots.
>
>QEMU command line I am using is this:
>qemu-system-x86_64 --enable-kvm --nographic -m 1024 -smp 4 -drive
>file=/mnt/F17,if=virtio -net nic,model=virtio -net user -redir
>tcp:2000::22
>
>Gluster volume is mounted in this manner:
>glusterfs -s bharata --volfile-id=test -L DEBUG -l glusterfs.log /mnt
>
>I see IO errors like this when VM boots:
>[ 1.698583] end_request: I/O error, dev vda, sector 9680896
>[ 1.699328] Buffer I/O error on device vda3, logical block 1081344
>[ 1.699328] lost page write due to I/O error on vda3
>[ 1.706644] end_request: I/O error, dev vda, sector 1030144
>[ 1.707630] Buffer I/O error on device vda3, logical block 0
>[ 1.707630] lost page write due to I/O error on vda3
>[ 1.718671] dracut:
>/dev/disk/by-uuid/d29b972f-3568-4db6-bf96-d2702ec83ab6: clean,
>21999/623392 files, 796916/2492672 blocks
>[ 1.723455] dracut: Remounting
>/dev/disk/by-uuid/d29b972f-3568-4db6-bf96-d2702ec83ab6 with -o ro
>
>VM eventually comes up with RO rootfs. Shutdown path sees these kinds of error:
>
>[ 16.034271] EXT4-fs (vda3): previous I/O error to superblock detected
>[ 16.041699] end_request: I/O error, dev vda, sector 1030144
>[ 16.042679] EXT4-fs error (device vda3): ext4_remount:4418: Abort
>forced by user
>[ 16.046465] EXT4-fs (vda3): re-mounted. Opts: (null)
>
>Full glusterfs log is too big to go with this mail. I can see this
>kind of errors:
>
>[2012-08-07 05:56:29.598636] T [io-cache.c:128:ioc_inode_flush]
>0-test-io-cache: locked inode(0xd2d2c0)
>[2012-08-07 05:56:29.598642] T [io-cache.c:132:ioc_inode_flush]
>0-test-io-cache: unlocked inode(0xd2d2c0)
>[2012-08-07 05:56:29.598651] T [fuse-bridge.c:2113:fuse_writev_cbk]
>0-glusterfs-fuse: 319: WRITE => 4096/4096,4956618752/10737418240
>[2012-08-07 05:56:29.598749] T [fuse-bridge.c:2293:fuse_fsync_resume]
>0-glusterfs-fuse: 320: FSYNC 0xd6f060
>[2012-08-07 05:56:29.598845] W [write-behind.c:2809:wb_fsync]
>0-test-write-behind: write behind wb_inode pointer is not stored in
>context of inode(0x7f9cb1eab0c0), returning EBADFD
>[2012-08-07 05:56:29.598858] W [fuse-bridge.c:1063:fuse_err_cbk]
>0-glusterfs-fuse: 320: FSYNC() ERR => -1 (File descriptor in bad
>state)
>[2012-08-07 05:56:29.605831] T [fuse-bridge.c:2154:fuse_write_resume]
>0-glusterfs-fuse: 322: WRITE (0xd6f060, size=4096, offset=527433728)
>
>Just to clarify, I am not using GlusterFS block backend in QEMU (via
>libgfapi) here but instead using it with normal FUSE mount.
>
>Regards,
>Bharata.
>--
><a href="http://bharata.sulekha.com/blog/posts.htm" target="_blank">http://bharata.sulekha.com/blog/posts.htm</a>, <a href="http://raobharata.wordpress.com/" target="_blank">http://raobharata.wordpress.com/</a><div><div>
>
>_______________________________________________
>Gluster-devel mailing list
><a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.org</a>
><a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/mailman/listinfo/gluster-devel</a>
</div></div></pre></div></div><br><br><span title="neteasefooter"><span></span></span><br>_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.org</a><br>
<a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/mailman/listinfo/gluster-devel</a><br>
<br></blockquote></div><br>
</blockquote></div></div></div></div></div></div><br><br><span title="neteasefooter"><span></span></span></blockquote></div><br>