is there any sysfs attribute storing the list of all attached cache devices? i would like to write a script to force flushing cache by stopping them all "echo 1 > /sys/fs/bcache/<cset-uuid>/stop" Furthermore, do the statement return only after the cache device is stopped or i need to poll until "/sys/fs/bcache/<cset-uuid>/bdev*/state"="clean" On Wed, Apr 27, 2016 at 10:10 AM, Eric Wheeler <bcache@xxxxxxxxxxxxxxxxxx> wrote: > > On Wed, 27 Apr 2016, ching lu wrote: > >> is there any command for forcing flushing cache or invalidate cache? > > I think you would benefit from reading this: > > https://www.kernel.org/doc/Documentation/bcache.txt > > > -- > Eric Wheeler > > > >> >> On Wed, Apr 27, 2016 at 3:57 AM, Eric Wheeler <bcache@xxxxxxxxxxxxxxxxxx> wrote: >> > On Tue, 26 Apr 2016, ching lu wrote: >> > >> >> Hi all, >> >> >> >> if i have 1 SSD caching 1 HDD using bcache, the cache mode is writeback >> >> >> >> if the PC shutdown/unmount normally, will all dirty data in the cache >> >> be flushed to backing device before poweroff? >> > >> > No, it will remain in the cache. >> > >> >> i am afraid that SSD lose data if left without power for a long time. >> >> e.g. hoilday. >> > >> > Wouldn't your data be retained if you used the SSD alone? SSDs should be >> > stable in a powered off state unless it is a bad device. >> > >> > There exist RAM-based disks that may be volatile, but that is unlikely to >> > be your situation. >> > >> > -- >> > Eric Wheeler >> > >> >> >> >> Thanks in advance, >> >> C >> >> -- >> >> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in >> >> the body of a message to majordomo@xxxxxxxxxxxxxxx >> >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> >> >> -- To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html