From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:46538 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755132AbcLOEPe (ORCPT ); Wed, 14 Dec 2016 23:15:34 -0500 From: Josef Bacik To: Kent Overstreet CC: "linux-fsdevel@vger.kernel.org" , "david@fromorbit.com" , "hch@lst.de" Subject: Re: Simulating disk failure with a writeback cache Date: Thu, 15 Dec 2016 04:15:27 +0000 Message-ID: <079409FD-B1CB-460B-AA1E-77EF0107B424@fb.com> References: <20161215022621.kvzga5my7bavxvli@kmo-pixel> In-Reply-To: <20161215022621.kvzga5my7bavxvli@kmo-pixel> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: dm-log-writes is probably what you want. Thanks, Josef Sent from my iPhone > On Dec 14, 2016, at 9:27 PM, Kent Overstreet = wrote: >=20 > As many tests as there are in xfstests that simulate disk failure/powerlo= ss, I'm > having a hard time believing that no one's bothered to write code to simu= late a > writeback cache (so the test can drop the cached writes and test flush/fu= a > correctness). >=20 > So does anyone know if such code exists and I just missed it? >=20 > Or failing that, any suggestions on the easiest way to hack something up?= This > is turning into a really irritating problem because it'd be simple enough= to > write from scratch, but given the amount of code we have that does stuff = like > this writing it from scratch seems rather silly - hacking loop to do buff= ered IO > instead of O_DIRECT would almost do it, I'd think, except I'm looking at = loop.c > and just trying to follow the entry points and control flow is making my = blood > pressure rise. >=20 > Ideally we'd have something that could easily slot into xfstests, which i= s using > dm-flakey for these tests right now... >=20 > Any ideas? > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" = in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html