diff options
author | NeilBrown <neilb@suse.de> | 2009-10-16 01:40:25 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-10-16 01:40:25 -0400 |
commit | 5dd33c9a4c29015f6d87568d33521c98931a387e (patch) | |
tree | a79ac38e1957580743b708410b54694f2b1cbf77 /drivers/md/raid5.c | |
parent | 5e5e3e78ed9038b8f7112835d07084eefb9daa47 (diff) |
md/async: don't pass a memory pointer as a page pointer.
md/raid6 passes a list of 'struct page *' to the async_tx routines,
which then either DMA map them for offload, or take the page_address
for CPU based calculations.
For RAID6 we sometime leave 'blanks' in the list of pages.
For CPU based calcs, we want to treat theses as a page of zeros.
For offloaded calculations, we simply don't pass a page to the
hardware.
Currently the 'blanks' are encoded as a pointer to
raid6_empty_zero_page. This is a 4096 byte memory region, not a
'struct page'. This is mostly handled correctly but is rather ugly.
So change the code to pass and expect a NULL pointer for the blanks.
When taking page_address of a page, we need to check for a NULL and
in that case use raid6_empty_zero_page.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index c4366c9373c5..dcd9e659ed9d 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -720,7 +720,7 @@ static int set_syndrome_sources(struct page **srcs, struct stripe_head *sh) | |||
720 | int i; | 720 | int i; |
721 | 721 | ||
722 | for (i = 0; i < disks; i++) | 722 | for (i = 0; i < disks; i++) |
723 | srcs[i] = (void *)raid6_empty_zero_page; | 723 | srcs[i] = NULL; |
724 | 724 | ||
725 | count = 0; | 725 | count = 0; |
726 | i = d0_idx; | 726 | i = d0_idx; |
@@ -816,7 +816,7 @@ ops_run_compute6_2(struct stripe_head *sh, struct raid5_percpu *percpu) | |||
816 | * slot number conversion for 'faila' and 'failb' | 816 | * slot number conversion for 'faila' and 'failb' |
817 | */ | 817 | */ |
818 | for (i = 0; i < disks ; i++) | 818 | for (i = 0; i < disks ; i++) |
819 | blocks[i] = (void *)raid6_empty_zero_page; | 819 | blocks[i] = NULL; |
820 | count = 0; | 820 | count = 0; |
821 | i = d0_idx; | 821 | i = d0_idx; |
822 | do { | 822 | do { |