Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Jun 2026 19:06:32 +0000
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 07d733963ecd - main - nfs_clrpcops.c: Change initial layout type to flex files
Message-ID:  <6a207b38.26c11.78270d4a@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=07d733963ecd1957999f5381b438b8c369686750

commit 07d733963ecd1957999f5381b438b8c369686750
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2026-06-03 19:04:59 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2026-06-03 19:04:59 +0000

    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.
---
 sys/fs/nfsclient/nfs_clrpcops.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index 75713c875622..812bb5279e07 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -5541,7 +5541,7 @@ nfsrpc_exchangeid(struct nfsmount *nmp, struct nfsclclient *clp,
 		    NFSHASPNFSOPT(nmp)) {
 			NFSCL_DEBUG(1, "set PNFS\n");
 			NFSLOCKMNT(nmp);
-			nmp->nm_state |= NFSSTA_PNFS;
+			nmp->nm_state |= NFSSTA_PNFS | NFSSTA_FLEXFILE;
 			NFSUNLOCKMNT(nmp);
 			dsp->nfsclds_flags |= NFSCLDS_MDS;
 		}
@@ -8910,10 +8910,10 @@ nfsrpc_layoutgetres(struct nfsmount *nmp, vnode_t vp, uint8_t *newfhp,
 
 	if (laystat == NFSERR_UNKNLAYOUTTYPE) {
 		NFSLOCKMNT(nmp);
-		if (!NFSHASFLEXFILE(nmp)) {
-			/* Switch to using Flex File Layout. */
-			nmp->nm_state |= NFSSTA_FLEXFILE;
-		} else if (layouttype == NFSLAYOUT_FLEXFILE) {
+		if (NFSHASFLEXFILE(nmp)) {
+			/* Switch to using File 4.1 Layout. */
+			nmp->nm_state &= ~NFSSTA_FLEXFILE;
+		} else if (layouttype == NFSLAYOUT_NFSV4_1_FILES) {
 			/* Disable pNFS. */
 			NFSCL_DEBUG(1, "disable PNFS\n");
 			nmp->nm_state &= ~(NFSSTA_PNFS | NFSSTA_FLEXFILE);


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a207b38.26c11.78270d4a>