Question on getfsstat()

Matthew Dillon mattdillonbsd at gmail.com
Mon Jul 4 16:21:17 PDT 2016


Interesting.  It is probably related to the hidden real root mount.  When there is an encrypted root, the real root is actually a RAM disk image, plus /dev.  The system root is mounted underneath it and essentially chrooted, then all the normal mounts plus another /dev are under that.  NULL is probably skipping the visibility filter.  If another dev doesn't get to it, I'll track it down on Thursday.

Sent from my iPad

> On Jul 4, 2016, at 11:07 AM, Tim Darby <t+dfbsd at timdarby.net> wrote:
> 
> Something about my system is causing the following getfsstat returns:
> getfsstat(NULL, 0, MNT_NOWAIT) returns 27
> 
> 
> getfsstat(mntbuf, (long)mntbufsize, MNT_NOWAIT) returns 25
> 
> The mount command shows that there are actually 25 mounted filesystems, so why would that first call to getfsstat return 27? Could it be because I'm using initrd to switch to an encrypted root on boot? This is on a 4.5 machine. If I install a fresh copy of the latest 4.5 and take all the installer defaults, the two getfsstat returns above match, so its obviously something I'm doing.
> 
> Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20160704/f23a16c4/attachment-0004.html>


More information about the Users mailing list