Joined: 09 Oct 2014
|Posted: Thu Jan 08, 2015 1:58 pm Post subject: bcache - flush cache now
I have a requirement that I need bcache (set as writeback) to do a flush of dirty caches 'now'. I know that the flush is done e.g. during cache detach, but that I don't want to do. I just want to have all the caches clean now...
I tried to
echo writethrough > /sys/block/bcache0/bcache/cache_mode
echo 5 > /sys/block/bcache0/bcache/writeback_delay
echo 0 > /sys/block/bcache0/bcache/writeback_delay
echo 0 > /sys/block/bcache0/bcache/writeback_percent
after that create a write access to the related cached device (touch + remove a file)
but the cache still stays dirty + have a 150MB of dirty data...
Linux 3.17.7 Gentoo
Thanks in advance