Lines Matching refs:iomode
355 pnfs_set_plh_return_info(struct pnfs_layout_hdr *lo, enum pnfs_iomode iomode, in pnfs_set_plh_return_info() argument
358 if (lo->plh_return_iomode != 0 && lo->plh_return_iomode != iomode) in pnfs_set_plh_return_info()
359 iomode = IOMODE_ANY; in pnfs_set_plh_return_info()
360 lo->plh_return_iomode = iomode; in pnfs_set_plh_return_info()
383 pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0); in pnfs_clear_layoutreturn_info()
418 .iomode = IOMODE_ANY, in nfs4_layout_refresh_old_stateid()
462 .iomode = IOMODE_ANY, in pnfs_mark_layout_stateid_invalid()
482 enum pnfs_iomode iomode, u32 seq) in pnfs_mark_layout_stateid_return() argument
485 .iomode = iomode, in pnfs_mark_layout_stateid_return()
493 pnfs_iomode_to_fail_bit(u32 iomode) in pnfs_iomode_to_fail_bit() argument
495 return iomode == IOMODE_RW ? in pnfs_iomode_to_fail_bit()
515 pnfs_layout_io_set_failed(struct pnfs_layout_hdr *lo, u32 iomode) in pnfs_layout_io_set_failed() argument
519 .iomode = iomode, in pnfs_layout_io_set_failed()
526 pnfs_layout_set_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_layout_io_set_failed()
531 iomode == IOMODE_RW ? "RW" : "READ"); in pnfs_layout_io_set_failed()
535 pnfs_layout_io_test_failed(struct pnfs_layout_hdr *lo, u32 iomode) in pnfs_layout_io_test_failed() argument
538 int fail_bit = pnfs_iomode_to_fail_bit(iomode); in pnfs_layout_io_test_failed()
600 pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0); in pnfs_cache_lseg_for_layoutreturn()
687 return (recall_range->iomode == IOMODE_ANY || in pnfs_should_free_range()
688 lseg_range->iomode == recall_range->iomode) && in pnfs_should_free_range()
737 lseg, lseg->pls_range.iomode, lseg->pls_seq, in pnfs_mark_matching_lsegs_invalid()
1203 if (range->iomode == IOMODE_READ) { in pnfs_alloc_init_layoutget_args()
1260 pnfs_set_plh_return_info(lo, range->iomode, seq); in pnfs_layoutreturn_retry_later_locked()
1308 enum pnfs_iomode *iomode) in pnfs_prepare_layoutreturn() argument
1322 if (iomode != NULL) in pnfs_prepare_layoutreturn()
1323 *iomode = lo->plh_return_iomode; in pnfs_prepare_layoutreturn()
1325 } else if (iomode != NULL) in pnfs_prepare_layoutreturn()
1326 *iomode = IOMODE_ANY; in pnfs_prepare_layoutreturn()
1335 enum pnfs_iomode iomode) in pnfs_init_layoutreturn_args() argument
1341 args->range.iomode = iomode; in pnfs_init_layoutreturn_args()
1352 enum pnfs_iomode iomode, in pnfs_send_layoutreturn() argument
1373 pnfs_init_layoutreturn_args(&lrp->args, lo, stateid, iomode); in pnfs_send_layoutreturn()
1407 enum pnfs_iomode iomode; in pnfs_layoutreturn_before_put_layout_hdr() local
1410 send = pnfs_prepare_layoutreturn(lo, &stateid, &cred, &iomode); in pnfs_layoutreturn_before_put_layout_hdr()
1414 pnfs_send_layoutreturn(lo, &stateid, &cred, iomode, in pnfs_layoutreturn_before_put_layout_hdr()
1435 .iomode = IOMODE_ANY, in _pnfs_return_layout()
1551 enum pnfs_iomode iomode = 0; in pnfs_roc() local
1596 if (skip_read && lseg->pls_range.iomode == IOMODE_READ) in pnfs_roc()
1608 pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0); in pnfs_roc()
1619 layoutreturn = pnfs_prepare_layoutreturn(lo, &stateid, &lc_cred, &iomode); in pnfs_roc()
1625 pnfs_init_layoutreturn_args(args, lo, &stateid, iomode); in pnfs_roc()
1642 pnfs_send_layoutreturn(lo, &stateid, &lc_cred, iomode, 0); in pnfs_roc()
1764 return (int)(l1->iomode == IOMODE_READ) - (int)(l2->iomode == IOMODE_READ); in pnfs_lseg_range_cmp()
1807 __func__, lseg, lseg->pls_range.iomode, in pnfs_generic_layout_insert_lseg()
1809 lp, lp->pls_range.iomode, lp->pls_range.offset, in pnfs_generic_layout_insert_lseg()
1816 __func__, lseg, lseg->pls_range.iomode, in pnfs_generic_layout_insert_lseg()
1911 if ((range->iomode == IOMODE_RW && in pnfs_lseg_range_match()
1912 ls_range->iomode != IOMODE_RW) || in pnfs_lseg_range_match()
1913 (range->iomode != ls_range->iomode && in pnfs_lseg_range_match()
1970 struct inode *ino, int iomode) in pnfs_within_mdsthreshold() argument
1983 switch (iomode) { in pnfs_within_mdsthreshold()
2087 enum pnfs_iomode iomode, in pnfs_update_layout() argument
2092 .iomode = iomode, in pnfs_update_layout()
2110 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2115 if (pnfs_within_mdsthreshold(ctx, ino, iomode)) { in pnfs_update_layout()
2116 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2124 iomode, lo, lseg, in pnfs_update_layout()
2139 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2146 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2153 if (pnfs_layout_io_test_failed(lo, iomode)) { in pnfs_update_layout()
2154 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2185 trace_pnfs_update_layout(ino, pos, count, iomode, lo, in pnfs_update_layout()
2190 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2197 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2230 iomode == IOMODE_RW ? FMODE_WRITE : FMODE_READ, in pnfs_update_layout()
2235 iomode, lo, lseg, in pnfs_update_layout()
2248 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2268 trace_pnfs_update_layout(ino, pos, count, iomode, lo, NULL, in pnfs_update_layout()
2278 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2293 lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_update_layout()
2298 pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_update_layout()
2309 iomode, lo, lseg, PNFS_UPDATE_LAYOUT_RETRY); in pnfs_update_layout()
2314 pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_update_layout()
2320 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, in pnfs_update_layout()
2329 iomode==IOMODE_RW ? "read/write" : "read-only", in pnfs_update_layout()
2342 switch (range->iomode) { in pnfs_sanity_check_layout_range()
2392 .iomode = (data->o_arg.fmode & FMODE_WRITE) ? in _lgopen_prepare_attached()
2401 if (rng.iomode == IOMODE_READ && in _lgopen_prepare_attached()
2427 .iomode = (data->o_arg.fmode & FMODE_WRITE) ? in _lgopen_prepare_floating()
2468 u32 iomode; in pnfs_parse_lgopen() local
2505 iomode = lgp->args.range.iomode; in pnfs_parse_lgopen()
2506 pnfs_layout_clear_fail_bit(lo, pnfs_iomode_to_fail_bit(iomode)); in pnfs_parse_lgopen()
2572 .iomode = IOMODE_ANY, in pnfs_layout_process()
2637 lseg, lseg->pls_range.iomode, in pnfs_mark_matching_lsegs_return()
2650 pnfs_set_plh_return_info(lo, return_range->iomode, seq); in pnfs_mark_matching_lsegs_return()
2655 pnfs_set_plh_return_info(lo, return_range->iomode, seq); in pnfs_mark_matching_lsegs_return()
2675 pnfs_set_plh_return_info(lo, range->iomode, 0); in pnfs_mark_layout_for_return()
2684 enum pnfs_iomode iomode; in pnfs_mark_layout_for_return() local
2686 return_now = pnfs_prepare_layoutreturn(lo, &stateid, &cred, &iomode); in pnfs_mark_layout_for_return()
2689 pnfs_send_layoutreturn(lo, &stateid, &cred, iomode, in pnfs_mark_layout_for_return()
2701 .iomode = lseg->pls_range.iomode, in pnfs_error_mark_layout_for_return()
2721 enum pnfs_iomode iomode) in pnfs_find_first_lseg() argument
2730 if (lseg->pls_range.iomode != iomode && iomode != IOMODE_ANY) in pnfs_find_first_lseg()
2748 !pnfs_find_first_lseg(lo, range, range->iomode)) in pnfs_should_return_unused_layout()
2757 switch (range->iomode) { in pnfs_should_return_unused_layout()
2778 enum pnfs_iomode iomode; in pnfs_layout_return_unused_byserver() local
2794 pnfs_set_plh_return_info(lo, range->iomode, 0); in pnfs_layout_return_unused_byserver()
2797 !pnfs_prepare_layoutreturn(lo, &stateid, &cred, &iomode)) { in pnfs_layout_return_unused_byserver()
2806 pnfs_send_layoutreturn(lo, &stateid, &cred, iomode, in pnfs_layout_return_unused_byserver()
2818 enum pnfs_iomode iomode) in pnfs_layout_return_unused_byclid() argument
2821 .iomode = iomode, in pnfs_layout_return_unused_byclid()
3244 if (lseg->pls_range.iomode == IOMODE_RW && in pnfs_list_write_lseg()
3265 pnfs_layout_io_set_failed(lseg->pls_layout, lseg->pls_range.iomode); in pnfs_set_lo_fail()