Date: Sat, 9 Mar 2024 06:27:28 -0800 From: Rick Macklem <rick.macklem@gmail.com> To: Alexander Leidinger <Alexander@leidinger.net> Cc: Warner Losh <imp@bsdimp.com>, Jamie Landeg-Jones <jamie@catflap.org>, current@freebsd.org Subject: Re: Reason why "nocache" option is not displayed in "mount"? Message-ID: <CAM5tNy7A3Sa-QzUNJcZYVJXpB=MG_N6aKkoiUviTrU0nb2iq1Q@mail.gmail.com> In-Reply-To: <b8a9464bc6e371568579c316e1e48101@Leidinger.net> References: <09bb45dea82d96c11f34cc48dda540dc@Leidinger.net> <202403072005.427K58KX014923@donotpassgo.dyslexicfish.net> <CANCZdfq2Z30jgh6Wt9Set=fZ271qr42Thy73YOxF=bh04R6Bfg@mail.gmail.com> <b8a9464bc6e371568579c316e1e48101@Leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 9, 2024 at 5:08=E2=80=AFAM Alexander Leidinger <Alexander@leidinger.net> wrote: > > Am 2024-03-09 06:07, schrieb Warner Losh: > > > On Thu, Mar 7, 2024 at 1:05=E2=80=AFPM Jamie Landeg-Jones <jamie@catfla= p.org> > > wrote: > > > >> Alexander Leidinger <Alexander@Leidinger.net> wrote: > >> > >>> Hi, > >>> > >>> what is the reason why "nocache" is not displayed in the output of > >>> "mount" for nullfs options? > >> > >> Good catch. I also notice that "hidden" is not shown either. > >> > >> I guess that as for some time, "nocache" was a "secret" option, no-one > >> update "mount" to display it? > > > > So a couple of things to know. > > > > First, there's a list of known options. These are converted to a > > bitmask. This is then decoded and reported by mount. The other strings > > are passed to the filesystem directly. They decode it and do things, > > but they don't export them (that I can find). I believe that's why they > > aren't reported with 'mount'. There's a couple of other options in > > /etc/fstab that are pseudo options too. > > That's the technical explanation why it doesn't work. I'm a step further > since initial mail, I even had a look at the code and know that nocache > is recorded in a nullfs private flag and that the userland can not > access this (mount looks at struct statfs which doesn't provide info to > this and some other things). > > My question was targeted more in the direction if there is a conceptual > reason or if it was an oversight that it is not displayed. I admit that > this was lost in translation... > > Regarding the issue of not being able to see all options which are in > effect for a given mount point (not specific to nocache): I consider > this to be a bug. > Pseudo options like "late" or "noauto" in fstab which don't make sense > to use when you use mount(8) a FS by hand, I do not consider here. As a data point, I added the "-m"option to nfsstat(1) so that all the nfs related options get displayed. Part of the problem is that this will be file system specific, since nmount= () defers processing options to the file systems. rick > > I'm not sure if this warrants a bug tracker item (which maybe nobody is > interested to take ownership of), or if we need to extend the man pages > with info which option will not by displayed in the output of mounted > FS, or both. > > Bye, > Alexander. > > -- > http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF > http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM5tNy7A3Sa-QzUNJcZYVJXpB=MG_N6aKkoiUviTrU0nb2iq1Q>