From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f67.google.com ([209.85.215.67]:35552 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbcGOQel (ORCPT ); Fri, 15 Jul 2016 12:34:41 -0400 Received: by mail-lf0-f67.google.com with SMTP id l89so7326268lfi.2 for ; Fri, 15 Jul 2016 09:34:41 -0700 (PDT) Subject: Re: [BUG] Btrfs scrub sometime recalculate wrong parity in raid5: take two To: Chris Mason , kreijack@inwind.it, linux-btrfs References: <46299275-04a2-d9f9-c47b-7917b04c9484@inwind.it> <4bdb4c42-ed13-3add-1da7-46a1acd8390e@fb.com> From: Andrei Borzenkov Message-ID: <5789109E.7090301@gmail.com> Date: Fri, 15 Jul 2016 19:34:38 +0300 MIME-Version: 1.0 In-Reply-To: <4bdb4c42-ed13-3add-1da7-46a1acd8390e@fb.com> Content-Type: text/plain; charset=utf-8 Sender: linux-btrfs-owner@vger.kernel.org List-ID: 15.07.2016 19:29, Chris Mason пишет: > >> However I have to point out that this kind of test is very >> difficult to do: the file-cache could lead to read an old data, so please >> suggestion about how flush the cache are good (I do some sync, >> unmount the filesystem and perform "echo 3 >/proc/sys/vm/drop_caches", >> but sometime it seems not enough). > > O_DIRECT should handle the cache flushing for you. > There is also BLKFLSBUF ioctl (blockdev --flushbufs on shell level).