nfs_clrpcops.c: Change initial layout type to flex files
Since the File 4.1 layout is only supported by some large configurations of Netapp Filers, switch the client pNFS code to attempting to use Flexible File Format first. File 4.1 Layout should still work for any servers that do no support Flexible File Layout.
This commit is contained in:
@@ -5541,7 +5541,7 @@ nfsrpc_exchangeid(struct nfsmount *nmp, struct nfsclclient *clp,
|
|||||||
NFSHASPNFSOPT(nmp)) {
|
NFSHASPNFSOPT(nmp)) {
|
||||||
NFSCL_DEBUG(1, "set PNFS\n");
|
NFSCL_DEBUG(1, "set PNFS\n");
|
||||||
NFSLOCKMNT(nmp);
|
NFSLOCKMNT(nmp);
|
||||||
nmp->nm_state |= NFSSTA_PNFS;
|
nmp->nm_state |= NFSSTA_PNFS | NFSSTA_FLEXFILE;
|
||||||
NFSUNLOCKMNT(nmp);
|
NFSUNLOCKMNT(nmp);
|
||||||
dsp->nfsclds_flags |= NFSCLDS_MDS;
|
dsp->nfsclds_flags |= NFSCLDS_MDS;
|
||||||
}
|
}
|
||||||
@@ -8910,10 +8910,10 @@ nfsrpc_layoutgetres(struct nfsmount *nmp, vnode_t vp, uint8_t *newfhp,
|
|||||||
|
|
||||||
if (laystat == NFSERR_UNKNLAYOUTTYPE) {
|
if (laystat == NFSERR_UNKNLAYOUTTYPE) {
|
||||||
NFSLOCKMNT(nmp);
|
NFSLOCKMNT(nmp);
|
||||||
if (!NFSHASFLEXFILE(nmp)) {
|
if (NFSHASFLEXFILE(nmp)) {
|
||||||
/* Switch to using Flex File Layout. */
|
/* Switch to using File 4.1 Layout. */
|
||||||
nmp->nm_state |= NFSSTA_FLEXFILE;
|
nmp->nm_state &= ~NFSSTA_FLEXFILE;
|
||||||
} else if (layouttype == NFSLAYOUT_FLEXFILE) {
|
} else if (layouttype == NFSLAYOUT_NFSV4_1_FILES) {
|
||||||
/* Disable pNFS. */
|
/* Disable pNFS. */
|
||||||
NFSCL_DEBUG(1, "disable PNFS\n");
|
NFSCL_DEBUG(1, "disable PNFS\n");
|
||||||
nmp->nm_state &= ~(NFSSTA_PNFS | NFSSTA_FLEXFILE);
|
nmp->nm_state &= ~(NFSSTA_PNFS | NFSSTA_FLEXFILE);
|
||||||
|
|||||||
Reference in New Issue
Block a user