Linux-bcache Archive mirror
 help / color / mirror / Atom feed
From: Eric Wheeler <bcache@lists.ewheeler.net>
To: Robert Krig <robert.krig@render-wahnsinn.de>
Cc: linux-bcache@vger.kernel.org
Subject: Re: Can you switch caching modes on the fly during use?
Date: Wed, 8 Feb 2023 18:38:25 -0800 (PST)	[thread overview]
Message-ID: <6ea8441d-5dce-e516-652a-f86e88b22174@ewheeler.net> (raw)
In-Reply-To: <92a2df4d-3631-b669-c275-1f067ad72bd1@render-wahnsinn.de>

On Mon, 6 Feb 2023, Robert Krig wrote:

> Hi. I was just wondering.
> 
> My cache device is a MD Raid1 SSD.
> My backing device is a BTRFS Raid10 on 8 Spinning disks.
> 
> 
> Everything is setup as default. Which, as far as I recall means writethrough
> caching.
> 
> Can I just switch the caching mode on the fly while the filesystem is in use,
> without any risks of corruption, or do I need to detach the cache, unmount the
> FS, etc...?

Yep!

	# cat /sys/block/bcache0/bcache/cache_mode 
	writethrough [writeback] writearound none

	# echo writeback > /sys/block/bcache0/bcache/cache_mode

More info:
	https://www.kernel.org/doc/Documentation/bcache.txt

-Eric

      reply	other threads:[~2023-02-09  2:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06  9:54 Can you switch caching modes on the fly during use? Robert Krig
2023-02-09  2:38 ` Eric Wheeler [this message]

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=6ea8441d-5dce-e516-652a-f86e88b22174@ewheeler.net \
    --to=bcache@lists.ewheeler.net \
    --cc=linux-bcache@vger.kernel.org \
    --cc=robert.krig@render-wahnsinn.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).