Lines Matching refs:percpu

1276 				 struct raid5_percpu *percpu, int i)  in to_addr_conv()  argument
1280 addr = flex_array_get(percpu->scribble, i); in to_addr_conv()
1285 static struct page **to_addr_page(struct raid5_percpu *percpu, int i) in to_addr_page() argument
1289 addr = flex_array_get(percpu->scribble, i); in to_addr_page()
1294 ops_run_compute5(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute5() argument
1297 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_compute5()
1319 ops_complete_compute, sh, to_addr_conv(sh, percpu, 0)); in ops_run_compute5()
1370 ops_run_compute6_1(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute6_1() argument
1373 struct page **blocks = to_addr_page(percpu, 0); in ops_run_compute6_1()
1407 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_1()
1420 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_1()
1428 ops_run_compute6_2(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute6_2() argument
1439 struct page **blocks = to_addr_page(percpu, 0); in ops_run_compute6_2()
1482 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1506 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1513 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1520 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1544 ops_run_prexor5(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_prexor5() argument
1548 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_prexor5()
1567 ops_complete_prexor, sh, to_addr_conv(sh, percpu, 0)); in ops_run_prexor5()
1574 ops_run_prexor6(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_prexor6() argument
1577 struct page **blocks = to_addr_page(percpu, 0); in ops_run_prexor6()
1587 ops_complete_prexor, sh, to_addr_conv(sh, percpu, 0)); in ops_run_prexor6()
1701 ops_run_reconstruct5(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_reconstruct5() argument
1732 xor_srcs = to_addr_page(percpu, j); in ops_run_reconstruct5()
1767 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct5()
1771 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct5()
1787 ops_run_reconstruct6(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_reconstruct6() argument
1815 blocks = to_addr_page(percpu, j); in ops_run_reconstruct6()
1833 head_sh, to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
1836 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
1858 static void ops_run_check_p(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_check_p() argument
1864 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_check_p()
1884 to_addr_conv(sh, percpu, 0)); in ops_run_check_p()
1893 static void ops_run_check_pq(struct stripe_head *sh, struct raid5_percpu *percpu, int checkp) in ops_run_check_pq() argument
1895 struct page **srcs = to_addr_page(percpu, 0); in ops_run_check_pq()
1909 sh, to_addr_conv(sh, percpu, 0)); in ops_run_check_pq()
1911 &sh->ops.zero_sum_result, percpu->spare_page, &submit); in ops_run_check_pq()
1920 struct raid5_percpu *percpu; in raid_run_ops() local
1924 percpu = per_cpu_ptr(conf->percpu, cpu); in raid_run_ops()
1932 tx = ops_run_compute5(sh, percpu); in raid_run_ops()
1935 tx = ops_run_compute6_1(sh, percpu); in raid_run_ops()
1937 tx = ops_run_compute6_2(sh, percpu); in raid_run_ops()
1946 tx = ops_run_prexor5(sh, percpu, tx); in raid_run_ops()
1948 tx = ops_run_prexor6(sh, percpu, tx); in raid_run_ops()
1958 ops_run_reconstruct5(sh, percpu, tx); in raid_run_ops()
1960 ops_run_reconstruct6(sh, percpu, tx); in raid_run_ops()
1965 ops_run_check_p(sh, percpu); in raid_run_ops()
1967 ops_run_check_pq(sh, percpu, 0); in raid_run_ops()
1969 ops_run_check_pq(sh, percpu, 1); in raid_run_ops()
2096 struct raid5_percpu *percpu; in resize_chunks() local
2099 percpu = per_cpu_ptr(conf->percpu, cpu); in resize_chunks()
2105 flex_array_free(percpu->scribble); in resize_chunks()
2106 percpu->scribble = scribble; in resize_chunks()
6301 static void free_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) in free_scratch_buffer() argument
6303 safe_put_page(percpu->spare_page); in free_scratch_buffer()
6304 if (percpu->scribble) in free_scratch_buffer()
6305 flex_array_free(percpu->scribble); in free_scratch_buffer()
6306 percpu->spare_page = NULL; in free_scratch_buffer()
6307 percpu->scribble = NULL; in free_scratch_buffer()
6310 static int alloc_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) in alloc_scratch_buffer() argument
6312 if (conf->level == 6 && !percpu->spare_page) in alloc_scratch_buffer()
6313 percpu->spare_page = alloc_page(GFP_KERNEL); in alloc_scratch_buffer()
6314 if (!percpu->scribble) in alloc_scratch_buffer()
6315 percpu->scribble = scribble_alloc(max(conf->raid_disks, in alloc_scratch_buffer()
6322 if (!percpu->scribble || (conf->level == 6 && !percpu->spare_page)) { in alloc_scratch_buffer()
6323 free_scratch_buffer(conf, percpu); in alloc_scratch_buffer()
6334 if (!conf->percpu) in raid5_free_percpu()
6343 free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); in raid5_free_percpu()
6346 free_percpu(conf->percpu); in raid5_free_percpu()
6370 struct raid5_percpu *percpu = per_cpu_ptr(conf->percpu, cpu); in raid456_cpu_notify() local
6375 if (alloc_scratch_buffer(conf, percpu)) { in raid456_cpu_notify()
6383 free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); in raid456_cpu_notify()
6397 conf->percpu = alloc_percpu(struct raid5_percpu); in raid5_alloc_percpu()
6398 if (!conf->percpu) in raid5_alloc_percpu()
6411 err = alloc_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); in raid5_alloc_percpu()