aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-05-11 00:51:19 -0400
committerNeilBrown <neilb@suse.de>2011-05-11 00:51:19 -0400
commitaf6d7b760c7547c1a410a333bdb24daed24e1043 (patch)
tree5789fa005f94911bc6a92a6cb8700b8025a3adc4 /drivers/md/raid1.h
parent7ca78d57d11a91bc93b35342fa58647b85bedeb1 (diff)
md/raid1: improve handling of pages allocated for write-behind.
The current handling and freeing of these pages is a bit fragile. We only keep the list of allocated pages in each bio, so we need to still have a valid bio when freeing the pages, which is a bit clumsy. So simply store the allocated page list in the r1_bio so it can easily be found and freed when we are finished with the r1_bio. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid1.h')
-rw-r--r--drivers/md/raid1.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h
index cbfdf1a6acd9..5fc4ca1af863 100644
--- a/drivers/md/raid1.h
+++ b/drivers/md/raid1.h
@@ -94,7 +94,9 @@ struct r1bio_s {
94 int read_disk; 94 int read_disk;
95 95
96 struct list_head retry_list; 96 struct list_head retry_list;
97 struct bitmap_update *bitmap_update; 97 /* Next two are only valid when R1BIO_BehindIO is set */
98 struct page **behind_pages;
99 int behind_page_count;
98 /* 100 /*
99 * if the IO is in WRITE direction, then multiple bios are used. 101 * if the IO is in WRITE direction, then multiple bios are used.
100 * We choose the number when they are allocated. 102 * We choose the number when they are allocated.