NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
RE: kern/59452: Move NFS wcc data messages to debug or control them via sysctl.
Hi Christos,
Patch is ok, just applied to 11.0RC4 sources, recompiled kernel and userland, reboot and observe.
Will let you know by EOW how this looks like, maybe there is chance to add into 11.0
Thanks,
--
Marcin Gondek / Drixter
http://fido.e-utp.net/
AS56662
-----Original Message-----
From: netbsd-bugs-owner%NetBSD.org@localhost <netbsd-bugs-owner%NetBSD.org@localhost> On Behalf Of Christos Zoulas via gnats
Sent: Monday, May 25, 2026 7:05 PM
To: kern-bug-people%netbsd.org@localhost; gnats-admin%netbsd.org@localhost; netbsd-bugs%netbsd.org@localhost; Marcin Gondek <drixter%e-utp.net@localhost>
Subject: Re: kern/59452: Move NFS wcc data messages to debug or control them via sysctl.
The following reply was made to PR kern/59452; it has been noted by GNATS.
From: Christos Zoulas <christos%zoulas.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost,
drixter%e-utp.net@localhost
Subject: Re: kern/59452: Move NFS wcc data messages to debug or control them via sysctl.
Date: Mon, 25 May 2026 13:02:40 -0400
--Apple-Mail=_0DA8FE95-C258-4AE8-9973-F2A6D11659AF
Content-Type: multipart/mixed;
boundary="Apple-Mail=_AF8CA433-09A1-4A38-B6D8-CDC2E19FBABB"
--Apple-Mail=_AF8CA433-09A1-4A38-B6D8-CDC2E19FBABB
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
How about this diff?
--Apple-Mail=_AF8CA433-09A1-4A38-B6D8-CDC2E19FBABB
Content-Disposition: attachment;
filename=nowccmsg.diff
Content-Type: application/octet-stream;
name=nowccmsg.diff;
x-unix-mode=0664
Content-Transfer-Encoding: 7bit
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) */
--Apple-Mail=_AF8CA433-09A1-4A38-B6D8-CDC2E19FBABB
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
christos
--Apple-Mail=_AF8CA433-09A1-4A38-B6D8-CDC2E19FBABB--
--Apple-Mail=_0DA8FE95-C258-4AE8-9973-F2A6D11659AF
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
iF0EARECAB0WIQS+BJlbqPkO0MDBdsRxESqxbLM7OgUCahSAsAAKCRBxESqxbLM7
Ok4TAJ9VASUY/q/H6/T2odWqYBTCs/IC1ACeJAW+anTYzfk8ghfHGTMiSw9dOU8=
=i3/Q
-----END PGP SIGNATURE-----
--Apple-Mail=_0DA8FE95-C258-4AE8-9973-F2A6D11659AF--
Home |
Main Index |
Thread Index |
Old Index