From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:57300 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753536AbcLSP1u (ORCPT ); Mon, 19 Dec 2016 10:27:50 -0500 Date: Mon, 19 Dec 2016 10:27:34 -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: <1482161254.17731.2@smtp.office365.com> In-Reply-To: <20161219030725.3kmsfu23sjypcnek@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> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Dec 18, 2016 at 10:07 PM, Kent Overstreet wrote: > On Sun, Dec 18, 2016 at 05:51:11PM -0900, Kent Overstreet wrote: >> On Sun, Dec 18, 2016 at 09:19:57PM +0000, Josef Bacik wrote: >> > Eeesh these are older than I thought, I pushed to >> > https://github.com/josefbacik/fstests.git. The fsx work is there >> and is >> > generic, the fsstress one has some btrfs specific stuff but you >> can just pull >> > that crap out and it'll work on anything. Let me know if you >> need anything >> > else, thanks, >> >> Thanks >> >> I got your first fsx based test up and running, but - did you get >> it to pass >> with any existing filesystems? >> >> I finally figured out what I'm seeing, in _check_files() where it's >> looping over >> the mark: I changed it to so that it always checks the fsync marks >> in the order >> where it was created, but when it goes to check the very first mark >> it's getting >> the very last version of the file (at least, the file size is >> consistent with >> that). >> >> I just pushed what I'm working off of, but I don't think it's >> anything I >> broke... >> >> >> https://urldefense.proofpoint.com/v2/url?u=https-3A__evilpiepirate.org_git_xfstests.git&d=DgIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=sDzg6MvHymKOUgI8SFIm4Q&m=E_8Rycs0b-Vo8GLKPW3XOah6HMo1P1ixJKC56-np3BQ&s=xABKM88GhCUwdBnB8_7bzZM76O0U9tnQdK6p40kdXtU&e= > > Just figured it out - log replay doesn't touch anything that hadn't > been written > at that point in the log, so the newer journal entries were still > there. fun... > > If I blow away the journal before replay, it works. 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, Josef