Lines Matching refs:mirror_ds

26 void nfs4_ff_layout_put_deviceid(struct nfs4_ff_layout_ds *mirror_ds)  in nfs4_ff_layout_put_deviceid()  argument
28 if (!IS_ERR_OR_NULL(mirror_ds)) in nfs4_ff_layout_put_deviceid()
29 nfs4_put_deviceid_node(&mirror_ds->id_node); in nfs4_ff_layout_put_deviceid()
32 void nfs4_ff_layout_free_deviceid(struct nfs4_ff_layout_ds *mirror_ds) in nfs4_ff_layout_free_deviceid() argument
34 nfs4_print_deviceid(&mirror_ds->id_node.deviceid); in nfs4_ff_layout_free_deviceid()
35 nfs4_pnfs_ds_put(mirror_ds->ds); in nfs4_ff_layout_free_deviceid()
36 kfree(mirror_ds->ds_versions); in nfs4_ff_layout_free_deviceid()
37 kfree_rcu(mirror_ds, id_node.rcu); in nfs4_ff_layout_free_deviceid()
262 if (IS_ERR_OR_NULL(mirror->mirror_ds)) in ff_layout_track_ds_error()
275 memcpy(&dserr->deviceid, &mirror->mirror_ds->id_node.deviceid, in ff_layout_track_ds_error()
327 if (mirror->mirror_ds == NULL) { in ff_layout_init_mirror_ds()
329 struct nfs4_ff_layout_ds *mirror_ds = ERR_PTR(-ENODEV); in ff_layout_init_mirror_ds() local
335 mirror_ds = FF_LAYOUT_MIRROR_DS(node); in ff_layout_init_mirror_ds()
338 if (cmpxchg(&mirror->mirror_ds, NULL, mirror_ds) && in ff_layout_init_mirror_ds()
339 mirror_ds != ERR_PTR(-ENODEV)) in ff_layout_init_mirror_ds()
343 if (IS_ERR(mirror->mirror_ds)) in ff_layout_init_mirror_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()
433 if (mirror && !mirror->mirror_ds->ds_versions[0].tightly_coupled) { in ff_layout_get_ds_cred()
456 switch (mirror->mirror_ds->ds_versions[0].version) { in nfs4_ff_find_or_create_ds_client()
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()
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()