Lines Matching refs:percpu

1274 				 struct raid5_percpu *percpu, int i)  in to_addr_conv()  argument
1278 addr = flex_array_get(percpu->scribble, i); in to_addr_conv()
1283 static struct page **to_addr_page(struct raid5_percpu *percpu, int i) in to_addr_page() argument
1287 addr = flex_array_get(percpu->scribble, i); in to_addr_page()
1292 ops_run_compute5(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute5() argument
1295 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_compute5()
1317 ops_complete_compute, sh, to_addr_conv(sh, percpu, 0)); in ops_run_compute5()
1368 ops_run_compute6_1(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute6_1() argument
1371 struct page **blocks = to_addr_page(percpu, 0); in ops_run_compute6_1()
1405 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_1()
1418 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_1()
1426 ops_run_compute6_2(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute6_2() argument
1437 struct page **blocks = to_addr_page(percpu, 0); in ops_run_compute6_2()
1480 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1504 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1511 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1518 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1542 ops_run_prexor5(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_prexor5() argument
1546 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_prexor5()
1565 ops_complete_prexor, sh, to_addr_conv(sh, percpu, 0)); in ops_run_prexor5()
1572 ops_run_prexor6(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_prexor6() argument
1575 struct page **blocks = to_addr_page(percpu, 0); in ops_run_prexor6()
1585 ops_complete_prexor, sh, to_addr_conv(sh, percpu, 0)); in ops_run_prexor6()
1699 ops_run_reconstruct5(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_reconstruct5() argument
1730 xor_srcs = to_addr_page(percpu, j); in ops_run_reconstruct5()
1765 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct5()
1769 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct5()
1785 ops_run_reconstruct6(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_reconstruct6() argument
1813 blocks = to_addr_page(percpu, j); in ops_run_reconstruct6()
1831 head_sh, to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
1834 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
1856 static void ops_run_check_p(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_check_p() argument
1862 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_check_p()
1882 to_addr_conv(sh, percpu, 0)); in ops_run_check_p()
1891 static void ops_run_check_pq(struct stripe_head *sh, struct raid5_percpu *percpu, int checkp) in ops_run_check_pq() argument
1893 struct page **srcs = to_addr_page(percpu, 0); in ops_run_check_pq()
1907 sh, to_addr_conv(sh, percpu, 0)); in ops_run_check_pq()
1909 &sh->ops.zero_sum_result, percpu->spare_page, &submit); in ops_run_check_pq()
1918 struct raid5_percpu *percpu; in raid_run_ops() local
1922 percpu = per_cpu_ptr(conf->percpu, cpu); in raid_run_ops()
1930 tx = ops_run_compute5(sh, percpu); in raid_run_ops()
1933 tx = ops_run_compute6_1(sh, percpu); in raid_run_ops()
1935 tx = ops_run_compute6_2(sh, percpu); in raid_run_ops()
1944 tx = ops_run_prexor5(sh, percpu, tx); in raid_run_ops()
1946 tx = ops_run_prexor6(sh, percpu, tx); in raid_run_ops()
1956 ops_run_reconstruct5(sh, percpu, tx); in raid_run_ops()
1958 ops_run_reconstruct6(sh, percpu, tx); in raid_run_ops()
1963 ops_run_check_p(sh, percpu); in raid_run_ops()
1965 ops_run_check_pq(sh, percpu, 0); in raid_run_ops()
1967 ops_run_check_pq(sh, percpu, 1); in raid_run_ops()
2094 struct raid5_percpu *percpu; in resize_chunks() local
2097 percpu = per_cpu_ptr(conf->percpu, cpu); in resize_chunks()
2103 flex_array_free(percpu->scribble); in resize_chunks()
2104 percpu->scribble = scribble; in resize_chunks()
6265 static void free_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) in free_scratch_buffer() argument
6267 safe_put_page(percpu->spare_page); in free_scratch_buffer()
6268 if (percpu->scribble) in free_scratch_buffer()
6269 flex_array_free(percpu->scribble); in free_scratch_buffer()
6270 percpu->spare_page = NULL; in free_scratch_buffer()
6271 percpu->scribble = NULL; in free_scratch_buffer()
6274 static int alloc_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) in alloc_scratch_buffer() argument
6276 if (conf->level == 6 && !percpu->spare_page) in alloc_scratch_buffer()
6277 percpu->spare_page = alloc_page(GFP_KERNEL); in alloc_scratch_buffer()
6278 if (!percpu->scribble) in alloc_scratch_buffer()
6279 percpu->scribble = scribble_alloc(max(conf->raid_disks, in alloc_scratch_buffer()
6286 if (!percpu->scribble || (conf->level == 6 && !percpu->spare_page)) { in alloc_scratch_buffer()
6287 free_scratch_buffer(conf, percpu); in alloc_scratch_buffer()
6298 if (!conf->percpu) in raid5_free_percpu()
6307 free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); in raid5_free_percpu()
6310 free_percpu(conf->percpu); in raid5_free_percpu()
6331 struct raid5_percpu *percpu = per_cpu_ptr(conf->percpu, cpu); in raid456_cpu_notify() local
6336 if (alloc_scratch_buffer(conf, percpu)) { in raid456_cpu_notify()
6344 free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); in raid456_cpu_notify()
6358 conf->percpu = alloc_percpu(struct raid5_percpu); in raid5_alloc_percpu()
6359 if (!conf->percpu) in raid5_alloc_percpu()
6372 err = alloc_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); in raid5_alloc_percpu()