Sample Header Ad - 728x90

Temporarily disable bcache read caching to run a scrub

2 votes
1 answer
211 views
I use btrfs atop of bcache. It caches small reads and that works great. When running a scrub of the btrfs however, I'd like those reads to go through to the backing devices because their contents are the ground truth; what I want to verify. One way to achieve that would be to detach the individual bcache devices from the bcache but doing so necessarily also detaches the bcache state which means it gets lost. It'd have to rebuild the cache every time I run a scrub. Is it possible to somehow achieve that without losing the cache? I want bcache to keep doing all of its regular state tracking; updating and invalidating the cache. When it comes to utilising the cache though, it should simply read directly from the backing drives and ignore any cached data.
Asked by Atemu (857 rep)
May 8, 2024, 01:47 AM
Last activity: Oct 16, 2024, 11:41 AM