diff options
author | Joe Thornber <ejt@redhat.com> | 2013-03-01 22:45:51 +0000 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2013-03-01 22:45:51 +0000 |
commit | c6b4fcbad044e6fffcc75bba160e720eb8d67d17 (patch) | |
tree | 1fb20e6ca157ebfbf2c97ae022fc6ba3e0550dd6 /drivers/md/dm-bio-prison.h | |
parent | 7a87edfee75151abb69d47dba2277ff2de0f6071 (diff) | |
download | op-kernel-dev-c6b4fcbad044e6fffcc75bba160e720eb8d67d17.zip op-kernel-dev-c6b4fcbad044e6fffcc75bba160e720eb8d67d17.tar.gz |
dm: add cache target
Add a target that allows a fast device such as an SSD to be used as a
cache for a slower device such as a disk.
A plug-in architecture was chosen so that the decisions about which data
to migrate and when are delegated to interchangeable tunable policy
modules. The first general purpose module we have developed, called
"mq" (multiqueue), follows in the next patch. Other modules are
under development.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Heinz Mauelshagen <mauelshagen@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-bio-prison.h')
-rw-r--r-- | drivers/md/dm-bio-prison.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/md/dm-bio-prison.h b/drivers/md/dm-bio-prison.h index 981a02d..3f83319 100644 --- a/drivers/md/dm-bio-prison.h +++ b/drivers/md/dm-bio-prison.h @@ -57,6 +57,17 @@ void dm_bio_prison_free_cell(struct dm_bio_prison *prison, struct dm_bio_prison_cell *cell); /* + * Creates, or retrieves a cell for the given key. + * + * Returns 1 if pre-existing cell returned, zero if new cell created using + * @cell_prealloc. + */ +int dm_get_cell(struct dm_bio_prison *prison, + struct dm_cell_key *key, + struct dm_bio_prison_cell *cell_prealloc, + struct dm_bio_prison_cell **cell_result); + +/* * An atomic op that combines retrieving a cell, and adding a bio to it. * * Returns 1 if the cell was already held, 0 if @inmate is the new holder. |