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">&lt;<a href="mailto:lancelotds@163.com" target="_blank">lancelotds@163.com</a>&gt;</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 &quot;writeback&quot; 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,&quot;Anand Avati&quot; &lt;<a href="mailto:anand.avati@gmail.com" target="_blank">anand.avati@gmail.com</a>&gt; 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">&lt;<a href="mailto:lancelotds@163.com" target="_blank">lancelotds@163.com</a>&gt;</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 &quot;,cache=writeback&quot; after &quot;if=virtio&quot;.</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,&quot;Bharata B Rao&quot; &lt;<a href="mailto:bharata.rao@gmail.com" target="_blank">bharata.rao@gmail.com</a>&gt; wrote:
&gt;Hi,
&gt;
&gt;With latest QEMU and latest gluster git, I observe guest root
&gt;filesystem corruption when the VM boots.
&gt;
&gt;QEMU command line I am using is this:
&gt;qemu-system-x86_64 --enable-kvm --nographic -m 1024 -smp 4 -drive
&gt;file=/mnt/F17,if=virtio -net nic,model=virtio -net user -redir
&gt;tcp:2000::22
&gt;
&gt;Gluster volume is mounted in this manner:
&gt;glusterfs -s bharata --volfile-id=test -L DEBUG -l glusterfs.log /mnt
&gt;
&gt;I see IO errors like this when VM boots:
&gt;[    1.698583] end_request: I/O error, dev vda, sector 9680896
&gt;[    1.699328] Buffer I/O error on device vda3, logical block 1081344
&gt;[    1.699328] lost page write due to I/O error on vda3
&gt;[    1.706644] end_request: I/O error, dev vda, sector 1030144
&gt;[    1.707630] Buffer I/O error on device vda3, logical block 0
&gt;[    1.707630] lost page write due to I/O error on vda3
&gt;[    1.718671] dracut:
&gt;/dev/disk/by-uuid/d29b972f-3568-4db6-bf96-d2702ec83ab6: clean,
&gt;21999/623392 files, 796916/2492672 blocks
&gt;[    1.723455] dracut: Remounting
&gt;/dev/disk/by-uuid/d29b972f-3568-4db6-bf96-d2702ec83ab6 with -o ro
&gt;
&gt;VM eventually comes up with RO rootfs. Shutdown path sees these kinds of error:
&gt;
&gt;[   16.034271] EXT4-fs (vda3): previous I/O error to superblock detected
&gt;[   16.041699] end_request: I/O error, dev vda, sector 1030144
&gt;[   16.042679] EXT4-fs error (device vda3): ext4_remount:4418: Abort
&gt;forced by user
&gt;[   16.046465] EXT4-fs (vda3): re-mounted. Opts: (null)
&gt;
&gt;Full glusterfs log is too big to go with this mail. I can see this
&gt;kind of errors:
&gt;
&gt;[2012-08-07 05:56:29.598636] T [io-cache.c:128:ioc_inode_flush]
&gt;0-test-io-cache: locked inode(0xd2d2c0)
&gt;[2012-08-07 05:56:29.598642] T [io-cache.c:132:ioc_inode_flush]
&gt;0-test-io-cache: unlocked inode(0xd2d2c0)
&gt;[2012-08-07 05:56:29.598651] T [fuse-bridge.c:2113:fuse_writev_cbk]
&gt;0-glusterfs-fuse: 319: WRITE =&gt; 4096/4096,4956618752/10737418240
&gt;[2012-08-07 05:56:29.598749] T [fuse-bridge.c:2293:fuse_fsync_resume]
&gt;0-glusterfs-fuse: 320: FSYNC 0xd6f060
&gt;[2012-08-07 05:56:29.598845] W [write-behind.c:2809:wb_fsync]
&gt;0-test-write-behind: write behind wb_inode pointer is not stored in
&gt;context of inode(0x7f9cb1eab0c0), returning EBADFD
&gt;[2012-08-07 05:56:29.598858] W [fuse-bridge.c:1063:fuse_err_cbk]
&gt;0-glusterfs-fuse: 320: FSYNC() ERR =&gt; -1 (File descriptor in bad
&gt;state)
&gt;[2012-08-07 05:56:29.605831] T [fuse-bridge.c:2154:fuse_write_resume]
&gt;0-glusterfs-fuse: 322: WRITE (0xd6f060, size=4096, offset=527433728)
&gt;
&gt;Just to clarify, I am not using GlusterFS block backend in QEMU (via
&gt;libgfapi) here but instead using it with normal FUSE mount.
&gt;
&gt;Regards,
&gt;Bharata.
&gt;-- 
&gt;<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>


&gt;
&gt;_______________________________________________
&gt;Gluster-devel mailing list
&gt;<a href="mailto:Gluster-devel@nongnu.org" target="_blank">Gluster-devel@nongnu.org</a>
&gt;<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>