Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95e2b7e9 authored by Jeff Layton's avatar Jeff Layton Committed by Anna Schumaker
Browse files

flexfiles: add kerneldoc header to nfs4_ff_layout_prepare_ds

parent 094069f1
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -343,7 +343,23 @@ nfs4_ff_layout_select_ds_fh(struct pnfs_layout_segment *lseg, u32 mirror_idx)
	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)