Lines Matching refs:iomode
354 pnfs_set_plh_return_info(struct pnfs_layout_hdr *lo, enum pnfs_iomode iomode, in pnfs_set_plh_return_info() argument
357 if (lo->plh_return_iomode != 0 && lo->plh_return_iomode != iomode) in pnfs_set_plh_return_info()
358 iomode = IOMODE_ANY; in pnfs_set_plh_return_info()
359 lo->plh_return_iomode = iomode; in pnfs_set_plh_return_info()
382 pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0); in pnfs_clear_layoutreturn_info()
417 .iomode = IOMODE_ANY, in nfs4_layout_refresh_old_stateid()
461 .iomode = IOMODE_ANY, in pnfs_mark_layout_stateid_invalid()
480 pnfs_iomode_to_fail_bit(u32 iomode) in pnfs_iomode_to_fail_bit() argument
482 return iomode == IOMODE_RW ? in pnfs_iomode_to_fail_bit()
502 pnfs_layout_io_set_failed(struct pnfs_layout_hdr *lo, u32 iomode) in pnfs_layout_io_set_failed() argument
506 .iomode = iomode, in pnfs_layout_io_set_failed()
513 pnfs_layout_set_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_layout_io_set_failed()
518 iomode == IOMODE_RW ? "RW" : "READ"); in pnfs_layout_io_set_failed()
522 pnfs_layout_io_test_failed(struct pnfs_layout_hdr *lo, u32 iomode) in pnfs_layout_io_test_failed() argument
525 int fail_bit = pnfs_iomode_to_fail_bit(iomode); in pnfs_layout_io_test_failed()
587 pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0); in pnfs_cache_lseg_for_layoutreturn()
674 return (recall_range->iomode == IOMODE_ANY || in pnfs_should_free_range()
675 lseg_range->iomode == recall_range->iomode) && in pnfs_should_free_range()
724 lseg, lseg->pls_range.iomode, lseg->pls_seq, in pnfs_mark_matching_lsegs_invalid()
1123 if (range->iomode == IOMODE_READ) { in pnfs_alloc_init_layoutget_args()
1196 enum pnfs_iomode *iomode) in pnfs_prepare_layoutreturn() argument
1210 if (iomode != NULL) in pnfs_prepare_layoutreturn()
1211 *iomode = lo->plh_return_iomode; in pnfs_prepare_layoutreturn()
1213 } else if (iomode != NULL) in pnfs_prepare_layoutreturn()
1214 *iomode = IOMODE_ANY; in pnfs_prepare_layoutreturn()
1223 enum pnfs_iomode iomode) in pnfs_init_layoutreturn_args() argument
1229 args->range.iomode = iomode; in pnfs_init_layoutreturn_args()
1240 enum pnfs_iomode iomode, in pnfs_send_layoutreturn() argument
1261 pnfs_init_layoutreturn_args(&lrp->args, lo, stateid, iomode); in pnfs_send_layoutreturn()
1276 enum pnfs_iomode iomode, in pnfs_layout_segments_returnable() argument
1281 .iomode = iomode, in pnfs_layout_segments_returnable()
1307 enum pnfs_iomode iomode; in pnfs_layoutreturn_before_put_layout_hdr() local
1310 send = pnfs_prepare_layoutreturn(lo, &stateid, &cred, &iomode); in pnfs_layoutreturn_before_put_layout_hdr()
1314 pnfs_send_layoutreturn(lo, &stateid, &cred, iomode, false); in pnfs_layoutreturn_before_put_layout_hdr()
1334 .iomode = IOMODE_ANY, in _pnfs_return_layout()
1431 enum pnfs_iomode iomode = 0; in pnfs_roc() local
1476 if (skip_read && lseg->pls_range.iomode == IOMODE_READ) in pnfs_roc()
1488 pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0); in pnfs_roc()
1499 layoutreturn = pnfs_prepare_layoutreturn(lo, &stateid, &lc_cred, &iomode); in pnfs_roc()
1505 pnfs_init_layoutreturn_args(args, lo, &stateid, iomode); in pnfs_roc()
1522 pnfs_send_layoutreturn(lo, &stateid, &lc_cred, iomode, true); in pnfs_roc()
1585 pnfs_set_plh_return_info(lo, args->range.iomode, 0); in pnfs_roc_release()
1643 return (int)(l1->iomode == IOMODE_READ) - (int)(l2->iomode == IOMODE_READ); in pnfs_lseg_range_cmp()
1686 __func__, lseg, lseg->pls_range.iomode, in pnfs_generic_layout_insert_lseg()
1688 lp, lp->pls_range.iomode, lp->pls_range.offset, in pnfs_generic_layout_insert_lseg()
1695 __func__, lseg, lseg->pls_range.iomode, in pnfs_generic_layout_insert_lseg()
1790 if ((range->iomode == IOMODE_RW && in pnfs_lseg_range_match()
1791 ls_range->iomode != IOMODE_RW) || in pnfs_lseg_range_match()
1792 (range->iomode != ls_range->iomode && in pnfs_lseg_range_match()
1849 struct inode *ino, int iomode) in pnfs_within_mdsthreshold() argument
1862 switch (iomode) { in pnfs_within_mdsthreshold()
1966 enum pnfs_iomode iomode, in pnfs_update_layout() argument
1971 .iomode = iomode, in pnfs_update_layout()
1987 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
1992 if (pnfs_within_mdsthreshold(ctx, ino, iomode)) { in pnfs_update_layout()
1993 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2001 iomode, lo, lseg, in pnfs_update_layout()
2016 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2023 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2030 if (pnfs_layout_io_test_failed(lo, iomode)) { in pnfs_update_layout()
2031 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2062 trace_pnfs_update_layout(ino, pos, count, iomode, lo, in pnfs_update_layout()
2067 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2074 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2107 iomode == IOMODE_RW ? FMODE_WRITE : FMODE_READ, in pnfs_update_layout()
2112 iomode, lo, lseg, in pnfs_update_layout()
2125 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2145 trace_pnfs_update_layout(ino, pos, count, iomode, lo, NULL, in pnfs_update_layout()
2155 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2170 lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_update_layout()
2175 pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_update_layout()
2184 iomode, lo, lseg, PNFS_UPDATE_LAYOUT_RETRY); in pnfs_update_layout()
2189 pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_update_layout()
2195 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2204 iomode==IOMODE_RW ? "read/write" : "read-only", in pnfs_update_layout()
2217 switch (range->iomode) { in pnfs_sanity_check_layout_range()
2267 .iomode = (data->o_arg.fmode & FMODE_WRITE) ? in _lgopen_prepare_attached()
2276 if (rng.iomode == IOMODE_READ && in _lgopen_prepare_attached()
2302 .iomode = (data->o_arg.fmode & FMODE_WRITE) ? in _lgopen_prepare_floating()
2343 u32 iomode; in pnfs_parse_lgopen() local
2380 iomode = lgp->args.range.iomode; in pnfs_parse_lgopen()
2381 pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_parse_lgopen()
2447 .iomode = IOMODE_ANY, in pnfs_layout_process()
2512 lseg, lseg->pls_range.iomode, in pnfs_mark_matching_lsegs_return()
2525 pnfs_set_plh_return_info(lo, return_range->iomode, seq); in pnfs_mark_matching_lsegs_return()
2530 pnfs_set_plh_return_info(lo, return_range->iomode, seq); in pnfs_mark_matching_lsegs_return()
2550 pnfs_set_plh_return_info(lo, range->iomode, 0); in pnfs_mark_layout_for_return()
2559 enum pnfs_iomode iomode; in pnfs_mark_layout_for_return() local
2561 return_now = pnfs_prepare_layoutreturn(lo, &stateid, &cred, &iomode); in pnfs_mark_layout_for_return()
2564 pnfs_send_layoutreturn(lo, &stateid, &cred, iomode, false); in pnfs_mark_layout_for_return()
2575 .iomode = lseg->pls_range.iomode, in pnfs_error_mark_layout_for_return()
2595 enum pnfs_iomode iomode) in pnfs_find_first_lseg() argument
2604 if (lseg->pls_range.iomode != iomode && iomode != IOMODE_ANY) in pnfs_find_first_lseg()
2622 !pnfs_find_first_lseg(lo, range, range->iomode)) in pnfs_should_return_unused_layout()
2631 switch (range->iomode) { in pnfs_should_return_unused_layout()
2652 enum pnfs_iomode iomode; in pnfs_layout_return_unused_byserver() local
2668 pnfs_set_plh_return_info(lo, range->iomode, 0); in pnfs_layout_return_unused_byserver()
2671 !pnfs_prepare_layoutreturn(lo, &stateid, &cred, &iomode)) { in pnfs_layout_return_unused_byserver()
2680 pnfs_send_layoutreturn(lo, &stateid, &cred, iomode, false); in pnfs_layout_return_unused_byserver()
2691 enum pnfs_iomode iomode) in pnfs_layout_return_unused_byclid() argument
2694 .iomode = iomode, in pnfs_layout_return_unused_byclid()
3128 if (lseg->pls_range.iomode == IOMODE_RW && in pnfs_list_write_lseg()
3149 pnfs_layout_io_set_failed(lseg->pls_layout, lseg->pls_range.iomode); in pnfs_set_lo_fail()