All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kent Overstreet <kent.overstreet@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: david@fromorbit.com, hch@lst.de
Subject: Simulating disk failure with a writeback cache
Date: Wed, 14 Dec 2016 17:26:21 -0900	[thread overview]
Message-ID: <20161215022621.kvzga5my7bavxvli@kmo-pixel> (raw)

As many tests as there are in xfstests that simulate disk failure/powerloss, I'm
having a hard time believing that no one's bothered to write code to simulate a
writeback cache (so the test can drop the cached writes and test flush/fua
correctness).

So does anyone know if such code exists and I just missed it?

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 buffered 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.

Ideally we'd have something that could easily slot into xfstests, which is using
dm-flakey for these tests right now...

Any ideas?

             reply	other threads:[~2016-12-15  2:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15  2:26 Kent Overstreet [this message]
2016-12-15  4:15 ` Simulating disk failure with a writeback cache Josef Bacik
2016-12-18 20:12   ` Kent Overstreet
2016-12-18 20:38     ` Josef Bacik
2016-12-18 20:46       ` Kent Overstreet
2016-12-18 21:19         ` Josef Bacik
2016-12-19  2:51           ` Kent Overstreet
2016-12-19  3:07             ` Kent Overstreet
2016-12-19 12:58               ` Josef Bacik
2016-12-19 15:27               ` Josef Bacik
2016-12-19 20:55                 ` Kent Overstreet
2016-12-19 21:00                   ` Josef Bacik
2016-12-19 21:53                     ` Kent Overstreet
2016-12-20  1:01                       ` Josef Bacik
2016-12-20  1:30                         ` Kent Overstreet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161215022621.kvzga5my7bavxvli@kmo-pixel \
    --to=kent.overstreet@gmail.com \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.