diff options
author | 2016-05-17 12:28:44 -0400 | |
---|---|---|
committer | 2016-05-17 15:48:11 -0400 | |
commit | 95e2b7e95d43c5c95620b12355a90713268376d3 (patch) | |
tree | 2b78772c83a1488804e2a2a4fd309826b87c15e1 /fs/nfs/flexfilelayout | |
parent | flexfiles: remove pointless setting of NFS_LAYOUT_RETURN_REQUESTED (diff) | |
download | linux-95e2b7e95d43c5c95620b12355a90713268376d3.tar.gz linux-95e2b7e95d43c5c95620b12355a90713268376d3.tar.bz2 linux-95e2b7e95d43c5c95620b12355a90713268376d3.zip |
flexfiles: add kerneldoc header to nfs4_ff_layout_prepare_ds
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/flexfilelayout')
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayoutdev.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index bb598923b2ef..35d84d0c0f21 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -343,7 +343,23 @@ out: return fh; } -/* Upon return, either ds is connected, or ds is NULL */ +/** + * nfs4_ff_layout_prepare_ds - prepare a DS connection for an RPC call + * @lseg: the layout segment we're operating on + * @ds_idx: index of the DS to use + * @fail_return: return layout on connect failure? + * + * Try to prepare a DS connection to accept an RPC call. This involves + * selecting a mirror to use and connecting the client to it if it's not + * already connected. + * + * Since we only need a single functioning mirror to satisfy a read, we don't + * want to return the layout if there is one. For writes though, any down + * mirror should result in a LAYOUTRETURN. @fail_return is how we distinguish + * between the two cases. + * + * Returns a pointer to a connected DS object on success or NULL on failure. + */ struct nfs4_pnfs_ds * nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx, bool fail_return) |