aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2016-05-17 12:28:44 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-05-17 15:48:11 -0400
commit95e2b7e95d43c5c95620b12355a90713268376d3 (patch)
tree2b78772c83a1488804e2a2a4fd309826b87c15e1
parent094069f1d96f691637b5c335f5eb79566d2457ff (diff)
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>
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayoutdev.c18
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:
343 return fh; 343 return fh;
344} 344}
345 345
346/* Upon return, either ds is connected, or ds is NULL */ 346/**
347 * nfs4_ff_layout_prepare_ds - prepare a DS connection for an RPC call
348 * @lseg: the layout segment we're operating on
349 * @ds_idx: index of the DS to use
350 * @fail_return: return layout on connect failure?
351 *
352 * Try to prepare a DS connection to accept an RPC call. This involves
353 * selecting a mirror to use and connecting the client to it if it's not
354 * already connected.
355 *
356 * Since we only need a single functioning mirror to satisfy a read, we don't
357 * want to return the layout if there is one. For writes though, any down
358 * mirror should result in a LAYOUTRETURN. @fail_return is how we distinguish
359 * between the two cases.
360 *
361 * Returns a pointer to a connected DS object on success or NULL on failure.
362 */
347struct nfs4_pnfs_ds * 363struct nfs4_pnfs_ds *
348nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx, 364nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx,
349 bool fail_return) 365 bool fail_return)