Lines Matching full:mirror
99 struct nfs_pgio_mirror *mirror = nfs_pgio_current_mirror(desc); in nfs_pgheader_init() local
102 hdr->req = nfs_list_entry(mirror->pg_list.next); in nfs_pgheader_init()
106 hdr->good_bytes = mirror->pg_count; in nfs_pgheader_init()
613 struct nfs_pgio_mirror *mirror = nfs_pgio_current_mirror(desc); in nfs_generic_pg_test() local
616 if (mirror->pg_count > mirror->pg_bsize) { in nfs_generic_pg_test()
626 if (((mirror->pg_count + req->wb_bytes) >> PAGE_SHIFT) * in nfs_generic_pg_test()
630 return min(mirror->pg_bsize - mirror->pg_count, (size_t)req->wb_bytes); in nfs_generic_pg_test()
797 static void nfs_pageio_mirror_init(struct nfs_pgio_mirror *mirror, in nfs_pageio_mirror_init() argument
800 INIT_LIST_HEAD(&mirror->pg_list); in nfs_pageio_mirror_init()
801 mirror->pg_bytes_written = 0; in nfs_pageio_mirror_init()
802 mirror->pg_count = 0; in nfs_pageio_mirror_init()
803 mirror->pg_bsize = bsize; in nfs_pageio_mirror_init()
804 mirror->pg_base = 0; in nfs_pageio_mirror_init()
805 mirror->pg_recoalesce = 0; in nfs_pageio_mirror_init()
877 struct nfs_pgio_mirror *mirror = nfs_pgio_current_mirror(desc); in nfs_generic_pgio() local
882 struct list_head *head = &mirror->pg_list; in nfs_generic_pgio()
886 unsigned int pg_base = offset_in_page(mirror->pg_base); in nfs_generic_pgio()
889 pagecount = nfs_page_array_len(pg_base, mirror->pg_count); in nfs_generic_pgio()
940 nfs_pgio_rpcsetup(hdr, pg_base, mirror->pg_count, desc->pg_ioflags, in nfs_generic_pgio()
1108 struct nfs_pgio_mirror *mirror = nfs_pgio_current_mirror(desc); in nfs_pageio_do_add_request() local
1112 if (list_empty(&mirror->pg_list)) { in nfs_pageio_do_add_request()
1117 mirror->pg_base = req->wb_pgbase; in nfs_pageio_do_add_request()
1118 mirror->pg_count = 0; in nfs_pageio_do_add_request()
1119 mirror->pg_recoalesce = 0; in nfs_pageio_do_add_request()
1121 prev = nfs_list_entry(mirror->pg_list.prev); in nfs_pageio_do_add_request()
1134 nfs_list_move_request(req, &mirror->pg_list); in nfs_pageio_do_add_request()
1135 mirror->pg_count += req->wb_bytes; in nfs_pageio_do_add_request()
1144 struct nfs_pgio_mirror *mirror = nfs_pgio_current_mirror(desc); in nfs_pageio_doio() local
1146 if (!list_empty(&mirror->pg_list)) { in nfs_pageio_doio()
1150 if (list_empty(&mirror->pg_list)) in nfs_pageio_doio()
1151 mirror->pg_bytes_written += mirror->pg_count; in nfs_pageio_doio()
1180 struct nfs_pgio_mirror *mirror = nfs_pgio_current_mirror(desc); in __nfs_pageio_add_request() local
1213 if (desc->pg_error < 0 || mirror->pg_recoalesce) in __nfs_pageio_add_request()
1236 struct nfs_pgio_mirror *mirror = nfs_pgio_current_mirror(desc); in nfs_do_recoalesce() local
1240 list_splice_init(&mirror->pg_list, &head); in nfs_do_recoalesce()
1241 mirror->pg_recoalesce = 0; in nfs_do_recoalesce()
1250 list_splice_tail(&head, &mirror->pg_list); in nfs_do_recoalesce()
1251 mirror->pg_recoalesce = 1; in nfs_do_recoalesce()
1256 } while (mirror->pg_recoalesce); in nfs_do_recoalesce()
1280 struct nfs_pgio_mirror *mirror; in nfs_pageio_error_cleanup() local
1286 mirror = nfs_pgio_get_mirror(desc, midx); in nfs_pageio_error_cleanup()
1287 desc->pg_completion_ops->error_cleanup(&mirror->pg_list, in nfs_pageio_error_cleanup()
1307 /* Create the mirror instances first, and fire them off */ in nfs_pageio_add_request()
1339 * nfs_pageio_complete_mirror - Complete I/O on the current mirror of an
1342 * @mirror_idx: pointer to mirror index
1347 struct nfs_pgio_mirror *mirror; in nfs_pageio_complete_mirror() local
1351 mirror = nfs_pgio_current_mirror(desc); in nfs_pageio_complete_mirror()
1355 if (desc->pg_error < 0 || !mirror->pg_recoalesce) in nfs_pageio_complete_mirror()
1430 struct nfs_pgio_mirror *mirror; in nfs_pageio_cond_complete() local
1436 mirror = nfs_pgio_get_mirror(desc, midx); in nfs_pageio_cond_complete()
1437 if (!list_empty(&mirror->pg_list)) { in nfs_pageio_cond_complete()
1438 prev = nfs_list_entry(mirror->pg_list.prev); in nfs_pageio_cond_complete()
1457 * nfs_pageio_stop_mirroring - stop using mirroring (set mirror count to 1)