diff options
| author | David S. Miller <davem@davemloft.net> | 2018-11-28 22:10:54 -0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-11-28 22:10:54 -0800 |
| commit | e561bb29b650d2817d10a4858f1817836ed08399 (patch) | |
| tree | 0bc92b5bb8a287a8e4a88732f3c64b56d126da58 /fs/nfs/flexfilelayout/flexfilelayoutdev.c | |
| parent | 62e3a931788223048120357ab3f29dcb55c5ef79 (diff) | |
| parent | 60b548237fed4b4164bab13c994dd9615f6c4323 (diff) | |
| download | linux-e561bb29b650d2817d10a4858f1817836ed08399.tar.gz linux-e561bb29b650d2817d10a4858f1817836ed08399.tar.bz2 linux-e561bb29b650d2817d10a4858f1817836ed08399.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Trivial conflict in net/core/filter.c, a locally computed
'sdif' is now an argument to the function.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayoutdev.c')
| -rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayoutdev.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index 74d8d5352438..d23347389626 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -370,6 +370,25 @@ out: return fh; } +int +nfs4_ff_layout_select_ds_stateid(struct pnfs_layout_segment *lseg, + u32 mirror_idx, + nfs4_stateid *stateid) +{ + struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, mirror_idx); + + if (!ff_layout_mirror_valid(lseg, mirror, false)) { + pr_err_ratelimited("NFS: %s: No data server for mirror offset index %d\n", + __func__, mirror_idx); + goto out; + } + + nfs4_stateid_copy(stateid, &mirror->stateid); + return 1; +out: + return 0; +} + /** * nfs4_ff_layout_prepare_ds - prepare a DS connection for an RPC call * @lseg: the layout segment we're operating on |
