public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Damien Le Moal <dlemoal@kernel.org>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: add a "discard cache" debug option to zloop
Date: Wed, 18 Mar 2026 06:53:13 +0100	[thread overview]
Message-ID: <20260318055331.1824108-1-hch@lst.de> (raw)

Hi all,

this series adds a new option to zloop to lose data not committed to stable
storage using a flush operation on device removal.  The idea is to help
testing that file system code does the right thing in face of volatile
write caches.  For conventional devices, this can be tested using
dm-log-writes, but the concepts there don't work for sequential write
required zones.  Instead this adds an option to zloop, which records the
write pointer at the last cache flush for each zone file in an xattr,
and truncates the files down to that value on removal, simulating losing
the contents of the volatile write cache.

Diffstat:
 Documentation/admin-guide/blockdev/zoned_loop.rst |    5 
 drivers/block/zloop.c                             |  337 ++++++++++++++--------
 2 files changed, 226 insertions(+), 116 deletions(-)

             reply	other threads:[~2026-03-18  6:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18  5:53 Christoph Hellwig [this message]
2026-03-18  5:53 ` [PATCH 1/2] zloop: refactor zloop_rw Christoph Hellwig
2026-03-18  6:58   ` Damien Le Moal
2026-03-18  5:53 ` [PATCH 2/2] zloop: forget write cache on force removal Christoph Hellwig
2026-03-18  7:03   ` Damien Le Moal

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=20260318055331.1824108-1-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox