From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:54711 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752522AbcLSVA5 (ORCPT ); Mon, 19 Dec 2016 16:00:57 -0500 Date: Mon, 19 Dec 2016 16:00:40 -0500 From: Josef Bacik Subject: Re: Simulating disk failure with a writeback cache To: Kent Overstreet CC: "linux-fsdevel@vger.kernel.org" , "david@fromorbit.com" , "hch@lst.de" Message-ID: <1482181240.24490.9@smtp.office365.com> In-Reply-To: <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> <20161219205514.dntaogt3vjos37w2@kmo-pixel> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Dec 19, 2016 at 3:55 PM, Kent Overstreet wrote: > 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. Ok that works fine in the short term for you, but ideally you wouldn't have to fix the test every time you wanted to run it on bcachefs. Do you have a suggestion of how to make this generic enough to support you as well without dd'ing the whole drive? Thanks, Josef