mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]>
This commit is contained in:
parent
5e5e3e78ed
commit
5dd33c9a4c
3 changed files with 17 additions and 18 deletions
|
|
@ -720,7 +720,7 @@ static int set_syndrome_sources(struct page **srcs, struct stripe_head *sh)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < disks; i++)
|
||||
srcs[i] = (void *)raid6_empty_zero_page;
|
||||
srcs[i] = NULL;
|
||||
|
||||
count = 0;
|
||||
i = d0_idx;
|
||||
|
|
@ -816,7 +816,7 @@ ops_run_compute6_2(struct stripe_head *sh, struct raid5_percpu *percpu)
|
|||
* slot number conversion for 'faila' and 'failb'
|
||||
*/
|
||||
for (i = 0; i < disks ; i++)
|
||||
blocks[i] = (void *)raid6_empty_zero_page;
|
||||
blocks[i] = NULL;
|
||||
count = 0;
|
||||
i = d0_idx;
|
||||
do {
|
||||
|
|
|
|||
Loading…
Reference in a new issue