From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f48.google.com ([209.85.214.48]:34916 "EHLO mail-it0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753966AbcLSUzT (ORCPT ); Mon, 19 Dec 2016 15:55:19 -0500 Received: by mail-it0-f48.google.com with SMTP id c20so67979628itb.0 for ; Mon, 19 Dec 2016 12:55:19 -0800 (PST) Date: Mon, 19 Dec 2016 11:55:14 -0900 From: Kent Overstreet To: Josef Bacik Cc: "linux-fsdevel@vger.kernel.org" , "david@fromorbit.com" , "hch@lst.de" Subject: Re: Simulating disk failure with a writeback cache Message-ID: <20161219205514.dntaogt3vjos37w2@kmo-pixel> References: <20161215022621.kvzga5my7bavxvli@kmo-pixel> <079409FD-B1CB-460B-AA1E-77EF0107B424@fb.com> <20161218201253.wv4bsheg4ook4bdx@kmo-pixel> <1482093534.17731.1@smtp.office365.com> <20161218204623.gea7u4d3pb7k3zhw@kmo-pixel> <05A4E7E7-E733-4AE9-BDC7-FEE9F66E387D@fb.com> <20161219025111.g2nayb3xtxvfbasu@kmo-pixel> <20161219030725.3kmsfu23sjypcnek@kmo-pixel> <1482161254.17731.2@smtp.office365.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1482161254.17731.2@smtp.office365.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Dec 19, 2016 at 10:27:34AM -0500, Josef Bacik wrote: > Oh sorry for some reason I only saw this reply but not your previous one > about seeing the last version of the file. Yeah that's kind of annoying, > I'll make a note to fix the test to do a wipefs before doing the log replay. > Does using wipefs work as well as dd'ing the first bit of the disk for you? > Thanks, That worked for the short test, but it won't work in general - the issue is that in bcache/bcachefs, btree nodes are also log structured, so if we just blow away the journal we'll still find btree node entries from the future (and it'll complain loudly on finding btree node entries far in the future of the most recent journal entry). For the bug I'm hunting now I'm gonna see if I can reproduce it with a small enough filesystem that I can just dd over the entire device between replays.