Index: sbin/mount_nfs/mount_nfs.8 =================================================================== RCS file: /cvsroot/src/sbin/mount_nfs/mount_nfs.8,v retrieving revision 1.52 diff -u -p -u -r1.52 mount_nfs.8 --- sbin/mount_nfs/mount_nfs.8 14 Mar 2021 02:56:51 -0000 1.52 +++ sbin/mount_nfs/mount_nfs.8 25 May 2026 17:01:58 -0000 @@ -29,7 +29,7 @@ .\" .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" -.Dd January 24, 2021 +.Dd May 25, 2026 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -234,6 +234,8 @@ Same as .It Cm wsize Ns = Ns Aq Ar writesize Same as .Fl w Ar writesize . +.It Cm nowccmsg +Disable WCC (Write Cache Consistency) warning messages. .El .It Fl P Use a reserved socket port number. Index: sbin/mount_nfs/mount_nfs.c =================================================================== RCS file: /cvsroot/src/sbin/mount_nfs/mount_nfs.c,v retrieving revision 1.76 diff -u -p -u -r1.76 mount_nfs.c --- sbin/mount_nfs/mount_nfs.c 3 Jan 2025 00:49:24 -0000 1.76 +++ sbin/mount_nfs/mount_nfs.c 25 May 2026 17:01:58 -0000 @@ -101,6 +101,7 @@ __RCSID("$NetBSD: mount_nfs.c,v 1.76 202 #define ALTF_TIMEO 0x00400000 #define ALTF_RETRANS 0x00800000 #define ALTF_UDP 0x01000000 +#define ALTF_NOWCCMSG 0x02000000 static const struct mntopt mopts[] = { MOPT_STDOPTS, @@ -130,6 +131,7 @@ static const struct mntopt mopts[] = { { "readahead", 0, ALTF_READAHEAD, 1 }, { "deadthresh", 0, ALTF_DEADTHRESH, 1 }, { "timeo", 0, ALTF_TIMEO, 1 }, + { "wccmsg", 1, ALTF_NOWCCMSG, 1 }, MOPT_NULL, }; @@ -291,6 +293,8 @@ mount_nfs_parseargs(int argc, char *argv nfsargsp->flags |= NFSMNT_INT; if (altflags & ALTF_NOAC) nfsargsp->flags |= NFSMNT_NOAC; + if (altflags & ALTF_NOWCCMSG) + nfsargsp->flags |= NFSMNT_NOWCCMSG; if (altflags & (ALTF_NFSV3|ALTF_NQNFS)) { if (force2) conflicting(); Index: sys/nfs/nfs_clntsubs.c =================================================================== RCS file: /cvsroot/src/sys/nfs/nfs_clntsubs.c,v retrieving revision 1.7 diff -u -p -u -r1.7 nfs_clntsubs.c --- sys/nfs/nfs_clntsubs.c 21 Mar 2023 15:47:46 -0000 1.7 +++ sys/nfs/nfs_clntsubs.c 25 May 2026 17:01:58 -0000 @@ -423,7 +423,8 @@ nfs_check_wccdata(struct nfsnode *np, co */ mutex_enter(&nmp->nm_lock); - if (!NFS_WCCKLUDGE(nmp, now)) { + if (!NFS_WCCKLUDGE(nmp, now) && + !(nmp->nm_flag & NFSMNT_NOWCCMSG)) { printf("%s: inaccurate wcc data (%s) detected," " disabling wcc" " (ctime %u.%09u %u.%09u," @@ -447,8 +448,9 @@ nfs_check_wccdata(struct nfsnode *np, co } else if (nmp->nm_iflag & NFSMNT_WCCKLUDGE) { mutex_enter(&nmp->nm_lock); if (nmp->nm_iflag & NFSMNT_WCCKLUDGE) { - printf("%s: re-enabling wcc\n", - vp->v_mount->mnt_stat.f_mntfromname); + if (!(nmp->nm_flag & NFSMNT_NOWCCMSG)) + printf("%s: re-enabling wcc\n", + vp->v_mount->mnt_stat.f_mntfromname); nmp->nm_iflag &= ~NFSMNT_WCCKLUDGE; } mutex_exit(&nmp->nm_lock); Index: sys/nfs/nfsmount.h =================================================================== RCS file: /cvsroot/src/sys/nfs/nfsmount.h,v retrieving revision 1.54 diff -u -p -u -r1.54 nfsmount.h --- sys/nfs/nfsmount.h 7 Dec 2024 02:05:55 -0000 1.54 +++ sys/nfs/nfsmount.h 25 May 2026 17:01:58 -0000 @@ -92,13 +92,15 @@ struct nfs_args { #define NFSMNT_READDIRSIZE 0x00020000 /* Set readdir size */ #define NFSMNT_XLATECOOKIE 0x00040000 /* 32<->64 dir cookie xlation */ #define NFSMNT_NOAC 0x00080000 /* Turn off attribute cache */ +#define NFSMNT_NOWCCMSG 0x00100000 /* Turn off attribute wcc messages */ #define NFSMNT_BITS "\177\20" \ "b\00soft\0b\01wsize\0b\02rsize\0b\03timeo\0" \ "b\04retrans\0b\05maxgrps\0b\06intr\0b\07noconn\0" \ "b\10nqnfs\0b\11nfsv3\0b\12kerb\0b\13dumbtimr\0" \ "b\14leaseterm\0b\15readahead\0b\16deadthresh\0b\17resvport\0" \ - "b\20rdirplus\0b\21readdirsize\0b\22xlatecookie\0b\23noac\0" + "b\20rdirplus\0b\21readdirsize\0b\22xlatecookie\0b\23noac\0" \ + "b\24nowccmsg\0" /* * NFS internal flags (nm_iflag) */