flexfilelayoutdev.c (415d2b3392d7a80903e0f97f051201aa02bf20e9) flexfilelayoutdev.c (10ec57e4c500007fb54b7030f1194121794d48eb)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device operations for the pnfs nfs4 file layout driver.
4 *
5 * Copyright (c) 2014, Primary Data, Inc. All rights reserved.
6 *
7 * Tao Peng <bergwolf@primarydata.com>
8 */

--- 439 unchanged lines hidden (view full) ---

448
449struct rpc_cred *
450ff_layout_get_ds_cred(struct pnfs_layout_segment *lseg, u32 ds_idx,
451 struct rpc_cred *mdscred)
452{
453 struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx);
454 struct rpc_cred *cred;
455
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device operations for the pnfs nfs4 file layout driver.
4 *
5 * Copyright (c) 2014, Primary Data, Inc. All rights reserved.
6 *
7 * Tao Peng <bergwolf@primarydata.com>
8 */

--- 439 unchanged lines hidden (view full) ---

448
449struct rpc_cred *
450ff_layout_get_ds_cred(struct pnfs_layout_segment *lseg, u32 ds_idx,
451 struct rpc_cred *mdscred)
452{
453 struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx);
454 struct rpc_cred *cred;
455
456 if (mirror) {
456 if (mirror && !mirror->mirror_ds->ds_versions[0].tightly_coupled) {
457 cred = ff_layout_get_mirror_cred(mirror, lseg->pls_range.iomode);
458 if (!cred)
459 cred = get_rpccred(mdscred);
460 } else {
461 cred = get_rpccred(mdscred);
462 }
463 return cred;
464}

--- 183 unchanged lines hidden ---
457 cred = ff_layout_get_mirror_cred(mirror, lseg->pls_range.iomode);
458 if (!cred)
459 cred = get_rpccred(mdscred);
460 } else {
461 cred = get_rpccred(mdscred);
462 }
463 return cred;
464}

--- 183 unchanged lines hidden ---