projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bb812d
)
dm cache: only use overwrite optimisation for promotion when in writeback mode
author
Joe Thornber
<ejt@redhat.com>
Thu, 27 Nov 2014 12:21:08 +0000
(12:21 +0000)
committer
Mike Snitzer
<snitzer@redhat.com>
Mon, 1 Dec 2014 16:30:12 +0000
(11:30 -0500)
Overwrite causes the cache block and origin blocks to diverge, which
is only allowed in writeback mode.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
drivers/md/dm-cache-target.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-cache-target.c
b/drivers/md/dm-cache-target.c
index fd7f613872833afba7eb56033580333b2236af00..ef842feda1015b51e2fd66e53ec4d7cfb42dde3e 100644
(file)
--- a/
drivers/md/dm-cache-target.c
+++ b/
drivers/md/dm-cache-target.c
@@
-1142,7
+1142,8
@@
static void issue_copy_or_discard(struct dm_cache_migration *mg)
avoid = is_discarded_oblock(cache, mg->new_oblock);
- if (!avoid && bio_writes_complete_block(cache, bio)) {
+ if (writeback_mode(&cache->features) &&
+ !avoid && bio_writes_complete_block(cache, bio)) {
issue_overwrite(mg, bio);
return;
}