diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2024-09-05 15:09:55 -0400 |
---|---|---|
committer | Anna Schumaker <anna.schumaker@oracle.com> | 2024-09-23 15:03:30 -0400 |
commit | d488b9d01fbc2ff5ccf15bcd47422eb156726c0d (patch) | |
tree | 682a1866f857807bed111cbdca59fcde9a518b4c /fs/nfs/flexfilelayout/flexfilelayoutdev.c | |
parent | fa88a7d6ae089c07aba872fff30a1342d3503e80 (diff) | |
download | linux-d488b9d01fbc2ff5ccf15bcd47422eb156726c0d.tar.gz linux-d488b9d01fbc2ff5ccf15bcd47422eb156726c0d.tar.bz2 linux-d488b9d01fbc2ff5ccf15bcd47422eb156726c0d.zip |
pnfs/flexfiles: enable localio support
If the DS is local to this client use localio to write the data.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayoutdev.c')
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index e028f5a0ef5f..e58bedfb1dcc 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -395,6 +395,12 @@ nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, /* connect success, check rsize/wsize limit */ if (!status) { + /* + * ds_clp is put in destroy_ds(). + * keep ds_clp even if DS is local, so that if local IO cannot + * proceed somehow, we can fall back to NFS whenever we want. + */ + nfs_local_probe(ds->ds_clp); max_payload = nfs_block_size(rpc_max_payload(ds->ds_clp->cl_rpcclient), NULL); |