summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2014-01-31 14:11:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-06 22:06:30 -0800
commitf755b3dbadd5a8d72a21cad3cdaf74d18737f0a6 (patch)
tree87b76d995b24886cad314b4f26f2ddf289f96b25
parent40e93d9d4ca18dc53f2e67896535549fc9e55f74 (diff)
downloadlwn-f755b3dbadd5a8d72a21cad3cdaf74d18737f0a6.tar.gz
lwn-f755b3dbadd5a8d72a21cad3cdaf74d18737f0a6.zip
dm cache: move hook_info into common portion of per_bio_data structure
commit c6eda5e81c4fcc77185117255c7419eda771f67f upstream. Commit c9d28d5d ("dm cache: promotion optimisation for writes") incorrectly placed the 'hook_info' member in the writethrough-only portion of the per_bio_data structure. Given that the overwrite optimization may be used for writeback the 'hook_info' member must be placed above the 'cache' member of the per_bio_data structure. Any members above 'cache' are available from both writeback and writethrough modes' per_bio_data structure. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/md/dm-cache-target.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 1b1469ebe5cb..c32821ff4de7 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -283,6 +283,7 @@ struct per_bio_data {
bool tick:1;
unsigned req_nr:2;
struct dm_deferred_entry *all_io_entry;
+ struct dm_hook_info hook_info;
/*
* writethrough fields. These MUST remain at the end of this
@@ -291,7 +292,6 @@ struct per_bio_data {
*/
struct cache *cache;
dm_cblock_t cblock;
- struct dm_hook_info hook_info;
struct dm_bio_details bio_details;
};