From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f171.google.com ([209.85.223.171]:46025 "EHLO mail-io0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660AbdKHMN0 (ORCPT ); Wed, 8 Nov 2017 07:13:26 -0500 Received: by mail-io0-f171.google.com with SMTP id i38so5697969iod.2 for ; Wed, 08 Nov 2017 04:13:26 -0800 (PST) Subject: Re: Problem with file system To: Chris Murphy Cc: Dave , Linux fs Btrfs References: <9871a669-141b-ac64-9da6-9050bcad7640@cn.fujitsu.com> <2164b4b2-1447-3670-73ae-465404754b87@gmail.com> From: "Austin S. Hemmelgarn" Message-ID: Date: Wed, 8 Nov 2017 07:13:22 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 2017-11-07 23:50, Chris Murphy wrote: > On Tue, Nov 7, 2017 at 6:02 AM, Austin S. Hemmelgarn > wrote: > >> * Optional automatic correction of errors detected during normal usage. >> Right now, you have to run a scrub to correct errors. Such a design makes >> sense with MD and LVM, where you don't know which copy is correct, but BTRFS >> does know which copy is correct (or how to rebuild the correct data), and it >> therefore makes sense to have an option to automatically rebuild data that >> is detected to be incorrect. > > ? > > It definitely does fix ups during normal operations. During reads, if > there's a UNC or there's corruption detected, Btrfs gets the good > copy, and does a (I think it's an overwrite, not COW) fixup. Fixups > don't just happen with scrubbing. Even raid56 supports these kinds of > passive fixups back to disk. I could have sworn it didn't rewrite the data on-disk during normal usage. I mean, I know for certain that it will return the correct data to userspace if at all possible, but I was under the impression it will just log the error during normal operation.