From nobody Sat Mar 09 09:30:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TsHnZ4ybtz5CmC0 for ; Sat, 9 Mar 2024 09:30:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TsHnY74Dgz4JQH for ; Sat, 9 Mar 2024 09:30:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 4299U1DQ035147; Sat, 9 Mar 2024 11:30:04 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 4299U1DQ035147 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 4299U11C035143; Sat, 9 Mar 2024 11:30:01 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 9 Mar 2024 11:30:01 +0200 From: Konstantin Belousov To: Mark Millard Cc: dev-commits-src-main@freebsd.org Subject: Re: git: 8921216dbee6 - main - nullfs: add -o cache ["mount" not reporting cache vs. nocache status for listed mounts?] Message-ID: References: List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4TsHnY74Dgz4JQH On Fri, Mar 08, 2024 at 02:02:27PM -0800, Mark Millard wrote: > [I'm picking one cache vs. nocache related message to use > to ask my question.] > > Konstantin Belousov wrote on > Date: Fri, 08 Mar 2024 18:44:52 UTC : > > > The branch main has been updated by kib: > > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=8921216dbee6884532e22d5347cff4d9ed23e782 > > > > commit 8921216dbee6884532e22d5347cff4d9ed23e782 > > Author: Konstantin Belousov > > AuthorDate: 2024-03-08 18:26:02 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2024-03-08 18:44:21 +0000 > > > > nullfs: add -o cache > > > > to allow overwrite global default if needed. > > > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > --- > > sys/fs/nullfs/null_vfsops.c | 15 +++++++++------ > > 1 file changed, 9 insertions(+), 6 deletions(-) > > > > diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c > > index 7ee6ce53fbde..63bdcd4788d9 100644 > > --- a/sys/fs/nullfs/null_vfsops.c > > +++ b/sys/fs/nullfs/null_vfsops.c > > @@ -205,12 +205,15 @@ nullfs_mount(struct mount *mp) > > MNT_IUNLOCK(mp); > > } > > > > - xmp->nullm_flags |= NULLM_CACHE; > > - if (!null_cache_vnodes || > > - vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 || > > - (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) != 0) > > - xmp->nullm_flags &= ~NULLM_CACHE; > > - > > + if (vfs_getopt(mp->mnt_optnew, "cache", NULL, NULL) == 0) { > > + xmp->nullm_flags |= NULLM_CACHE; > > + } else if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0) { > > + ; > > + } else if (null_cache_vnodes && > > + (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) == 0) { > > + xmp->nullm_flags |= NULLM_CACHE; > > + } > > + > > if ((xmp->nullm_flags & NULLM_CACHE) != 0) { > > vfs_register_for_notification(xmp->nullm_vfs, mp, > > &xmp->notify_node); > > > Does the mount command report the cache vs. no cache status of the mounts > that it lists? Mount uses getfsstat(2) which has no knowledge of nmount(2). > > https://lists.freebsd.org/archives/freebsd-current/2024-March/005690.html > > is is recent a report that it does not. A reply mentions that "ignore" vs. > not has a similar status of not being reported: > > https://lists.freebsd.org/archives/freebsd-current/2024-March/005695.html > > === > Mark Millard > marklmi at yahoo.com >