]> git.baikalelectronics.ru Git - kernel.git/commit
pnfs: add a new mechanism to select a layout driver according to an ordered list
authorJeff Layton <jlayton@redhat.com>
Thu, 15 Sep 2016 18:40:49 +0000 (14:40 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 19 Sep 2016 17:11:13 +0000 (13:11 -0400)
commit295574b357609aa8599498e72e5c0264c0a2e86f
tree07fe5e65d81652746607babd8553e1316cd10a79
parent3a536ab4dbdec1c9455a60e602628648d88d5a57
pnfs: add a new mechanism to select a layout driver according to an ordered list

Currently, the layout driver selection code always chooses the first one
from the list. That's not really ideal however, as the server can send
the list of layout types in any order that it likes. It's up to the
client to select the best one for its needs.

This patch adds an ordered list of preferred driver types and has the
selection code sort the list of available layout drivers according to it.
Any unrecognized layout type is sorted to the end of the list.

For now, the order of preference is hardcoded, but it should be possible
to make this configurable in the future.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/client.c
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
fs/nfs/pnfs.c
fs/nfs/pnfs.h
include/linux/nfs_xdr.h