Lines Matching full:mirror

253 			     struct nfs4_ff_layout_mirror *mirror, u64 offset,  in ff_layout_track_ds_error()  argument
262 if (IS_ERR_OR_NULL(mirror->mirror_ds)) in ff_layout_track_ds_error()
274 nfs4_stateid_copy(&dserr->stateid, &mirror->stateid); in ff_layout_track_ds_error()
275 memcpy(&dserr->deviceid, &mirror->mirror_ds->id_node.deviceid, in ff_layout_track_ds_error()
285 ff_layout_get_mirror_cred(struct nfs4_ff_layout_mirror *mirror, u32 iomode) in ff_layout_get_mirror_cred() argument
290 pcred = &mirror->ro_cred; in ff_layout_get_mirror_cred()
292 pcred = &mirror->rw_cred; in ff_layout_get_mirror_cred()
307 nfs4_ff_layout_select_ds_fh(struct nfs4_ff_layout_mirror *mirror) in nfs4_ff_layout_select_ds_fh() argument
310 return &mirror->fh_versions[0]; in nfs4_ff_layout_select_ds_fh()
314 nfs4_ff_layout_select_ds_stateid(const struct nfs4_ff_layout_mirror *mirror, in nfs4_ff_layout_select_ds_stateid() argument
317 if (nfs4_ff_layout_ds_version(mirror) == 4) in nfs4_ff_layout_select_ds_stateid()
318 nfs4_stateid_copy(stateid, &mirror->stateid); in nfs4_ff_layout_select_ds_stateid()
323 struct nfs4_ff_layout_mirror *mirror) in ff_layout_init_mirror_ds() argument
325 if (mirror == NULL) in ff_layout_init_mirror_ds()
327 if (mirror->mirror_ds == NULL) { in ff_layout_init_mirror_ds()
332 &mirror->devid, lo->plh_lc_cred, in ff_layout_init_mirror_ds()
338 if (cmpxchg(&mirror->mirror_ds, NULL, mirror_ds) && in ff_layout_init_mirror_ds()
343 if (IS_ERR(mirror->mirror_ds)) in ff_layout_init_mirror_ds()
354 * @mirror: layout mirror describing the DS to use
358 * selecting a mirror to use and connecting the client to it if it's not
361 * Since we only need a single functioning mirror to satisfy a read, we don't
363 * mirror should result in a LAYOUTRETURN. @fail_return is how we distinguish
370 struct nfs4_ff_layout_mirror *mirror, in nfs4_ff_layout_prepare_ds() argument
379 if (!ff_layout_init_mirror_ds(lseg->pls_layout, mirror)) in nfs4_ff_layout_prepare_ds()
382 ds = mirror->mirror_ds->ds; in nfs4_ff_layout_prepare_ds()
391 status = nfs4_pnfs_ds_connect(s, ds, &mirror->mirror_ds->id_node, in nfs4_ff_layout_prepare_ds()
393 mirror->mirror_ds->ds_versions[0].version, in nfs4_ff_layout_prepare_ds()
394 mirror->mirror_ds->ds_versions[0].minor_version); in nfs4_ff_layout_prepare_ds()
407 if (mirror->mirror_ds->ds_versions[0].rsize > max_payload) in nfs4_ff_layout_prepare_ds()
408 mirror->mirror_ds->ds_versions[0].rsize = max_payload; in nfs4_ff_layout_prepare_ds()
409 if (mirror->mirror_ds->ds_versions[0].wsize > max_payload) in nfs4_ff_layout_prepare_ds()
410 mirror->mirror_ds->ds_versions[0].wsize = max_payload; in nfs4_ff_layout_prepare_ds()
415 mirror, lseg->pls_range.offset, in nfs4_ff_layout_prepare_ds()
427 ff_layout_get_ds_cred(struct nfs4_ff_layout_mirror *mirror, in ff_layout_get_ds_cred() argument
433 if (mirror && !mirror->mirror_ds->ds_versions[0].tightly_coupled) { in ff_layout_get_ds_cred()
434 cred = ff_layout_get_mirror_cred(mirror, range->iomode); in ff_layout_get_ds_cred()
445 * @mirror: pointer to the mirror
453 nfs4_ff_find_or_create_ds_client(struct nfs4_ff_layout_mirror *mirror, in nfs4_ff_find_or_create_ds_client() argument
456 switch (mirror->mirror_ds->ds_versions[0].version) { in nfs4_ff_find_or_create_ds_client()
560 struct nfs4_ff_layout_mirror *mirror; in ff_read_layout_has_available_ds() local
565 mirror = FF_LAYOUT_COMP(lseg, idx); in ff_read_layout_has_available_ds()
566 if (mirror) { in ff_read_layout_has_available_ds()
567 if (!mirror->mirror_ds) in ff_read_layout_has_available_ds()
569 if (IS_ERR(mirror->mirror_ds)) in ff_read_layout_has_available_ds()
571 devid = &mirror->mirror_ds->id_node; in ff_read_layout_has_available_ds()
582 struct nfs4_ff_layout_mirror *mirror; in ff_rw_layout_has_available_ds() local
587 mirror = FF_LAYOUT_COMP(lseg, idx); in ff_rw_layout_has_available_ds()
588 if (!mirror || IS_ERR(mirror->mirror_ds)) in ff_rw_layout_has_available_ds()
590 if (!mirror->mirror_ds) in ff_rw_layout_has_available_ds()
592 devid = &mirror->mirror_ds->id_node; in ff_rw_layout_has_available_ds()