summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-metadata.h
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2013-10-24 14:10:29 -0400
committerMike Snitzer <snitzer@redhat.com>2013-11-11 11:37:49 -0500
commit2ee57d587357f0d752af6c2e3e46434a74b1bee3 (patch)
treebecc2422f9ca836b4a6903051a64f3114b16eeb7 /drivers/md/dm-cache-metadata.h
parentf494a9c6b1b6dd9a9f21bbb75d9210d478eeb498 (diff)
downloadop-kernel-dev-2ee57d587357f0d752af6c2e3e46434a74b1bee3.zip
op-kernel-dev-2ee57d587357f0d752af6c2e3e46434a74b1bee3.tar.gz
dm cache: add passthrough mode
"Passthrough" is a dm-cache operating mode (like writethrough or writeback) which is intended to be used when the cache contents are not known to be coherent with the origin device. It behaves as follows: * All reads are served from the origin device (all reads miss the cache) * All writes are forwarded to the origin device; additionally, write hits cause cache block invalidates This mode decouples cache coherency checks from cache device creation, largely to avoid having to perform coherency checks while booting. Boot scripts can create cache devices in passthrough mode and put them into service (mount cached filesystems, for example) without having to worry about coherency. Coherency that exists is maintained, although the cache will gradually cool as writes take place. Later, applications can perform coherency checks, the nature of which will depend on the type of the underlying storage. If coherency can be verified, the cache device can be transitioned to writethrough or writeback mode while still warm; otherwise, the cache contents can be discarded prior to transitioning to the desired operating mode. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Morgan Mears <Morgan.Mears@netapp.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-metadata.h')
-rw-r--r--drivers/md/dm-cache-metadata.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/dm-cache-metadata.h b/drivers/md/dm-cache-metadata.h
index f45cef2..cd906f1 100644
--- a/drivers/md/dm-cache-metadata.h
+++ b/drivers/md/dm-cache-metadata.h
@@ -137,6 +137,11 @@ int dm_cache_begin_hints(struct dm_cache_metadata *cmd, struct dm_cache_policy *
int dm_cache_save_hint(struct dm_cache_metadata *cmd,
dm_cblock_t cblock, uint32_t hint);
+/*
+ * Query method. Are all the blocks in the cache clean?
+ */
+int dm_cache_metadata_all_clean(struct dm_cache_metadata *cmd, bool *result);
+
/*----------------------------------------------------------------*/
#endif /* DM_CACHE_METADATA_H */
OpenPOWER on IntegriCloud