Re: many csum warning/errors on qemu guests using btrfs

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

 




On 2020/4/30 下午1:01, Chris Murphy wrote:
> On Wed, Apr 29, 2020 at 7:46 PM Qu Wenruo <quwenruo.btrfs@xxxxxxx> wrote:
>>
>>
>>
>> On 2020/4/30 上午3:21, Chris Murphy wrote:
>>> On Wed, Apr 29, 2020 at 9:45 AM Michal Soltys <msoltyspl@xxxxxxxxx> wrote:
>>>>
>>>> Short update:
>>>>
>>>> 1) turned out to not be btrfs fault in any way or form, as we recreated
>>>> the same issue with ext4 while manually checksumming the files; so if
>>>> anything, btrfs told us we have actual issues somewhere =)
>>
>> Is that related to mixing buffered write with DIO write?
>>
>> If so, maybe changing the qemu cache mode may help?
> 
> I thought this would only happen if the host is Btrfs?

Mixed buffered write with direct IO is known to cause problem, not only
for btrfs, but almost all fses.

> Maybe it's a
> bit crazy but these days I only use Btrfs on Btrfs with cache=unsafe.

Unlike the name, if you're using cache=unsafe, all writes are buffered,
thus you won't hit any csum mismatch problem caused by this.

But you can hit other problems though, e.g. if memory pressure is
forcing some image data to be written, it can break the COW requirement
of the VM (but the file is still completely sane).

> I do lots of VM force quits, never see any problems. I haven't tested
> it, but I think unsafe is quite unsafe if the host crashes/power fails
> while the guest is active. Performance is much better though.
> 
Yeah, host power loss is another problem.

But at least, cache=unsafe actually avoids the csum problem.

Thanks,
Qu

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux