lanconnected / EnhanceIO

EnhanceIO Open Source for Linux
Other
101 stars 31 forks source link

Disabling cache without flushing data #50

Open rezass opened 5 years ago

rezass commented 5 years ago

Is there anyway to disable the cache without flushing data? I tried to change the function call to eio_ttc_deactivate by setting the second parameter to 1. The cache is disabled, but it is not removed from the list of caches.

The other option, which I've found is using fast_remove option. Can I delete the cache with this option and then enable it again later to use the data in the cache?

CPT-GrayWolf commented 5 years ago

Documentation is fuzzy at best, but I have found disable and enable options in the cli that allow you to temporarily stop or start a cache without removing it's configuration.

Weather or not this will result in the cache being flushed... Well, I dug through the code for a bit, and I'm still not sure. The "disable" command does call the delete function internally, but it remains to be seen exactly how it behaves in this context. The code is rather unclear in spots, and incomplete in others. On top of that, my understanding of kernel modules is minimal, at best (though improving recently, and most of it is still just C).

It's probably best to assume it's simply dropping the cache, the same way that calling delete would (flush and remove), just keeping the configuration so that you don't have to create it again. But you can test it out and see what happens.

I'll let you know if I can find anything else out.