diff options
author | Joe Thornber <ejt@redhat.com> | 2015-05-15 16:20:09 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-05-29 20:19:04 +0200 |
commit | 20f6814b94fff4a98b123f1c2b691e936be27aaf (patch) | |
tree | 1845743b06f1a2e999a37c5ae98ba6649753a95a /drivers/md/dm-cache-policy-internal.h | |
parent | dm cache: track IO to the origin device using io_tracker (diff) | |
download | linux-20f6814b94fff4a98b123f1c2b691e936be27aaf.tar.xz linux-20f6814b94fff4a98b123f1c2b691e936be27aaf.zip |
dm cache: pass a new 'critical' flag to the policies when requesting writeback work
We only allow non critical writeback if the origin is idle. It is up
to the policy to decide what writeback work is critical.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-policy-internal.h')
-rw-r--r-- | drivers/md/dm-cache-policy-internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-policy-internal.h b/drivers/md/dm-cache-policy-internal.h index c198e6defb9c..776c685167e6 100644 --- a/drivers/md/dm-cache-policy-internal.h +++ b/drivers/md/dm-cache-policy-internal.h @@ -55,9 +55,10 @@ static inline int policy_walk_mappings(struct dm_cache_policy *p, static inline int policy_writeback_work(struct dm_cache_policy *p, dm_oblock_t *oblock, - dm_cblock_t *cblock) + dm_cblock_t *cblock, + bool critical_only) { - return p->writeback_work ? p->writeback_work(p, oblock, cblock) : -ENOENT; + return p->writeback_work ? p->writeback_work(p, oblock, cblock, critical_only) : -ENOENT; } static inline void policy_remove_mapping(struct dm_cache_policy *p, dm_oblock_t oblock) |