Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 2010 14:16:54 +0000
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Document EVFILT_FS and VQ_*
Message-ID:  <AANLkTim0XGTHXEYkMqBB%2B8mAMapHTCnYni=LV0645_6K@mail.gmail.com>
In-Reply-To: <201009210915.46556.jhb@freebsd.org>
References:  <20100921122033.GA22567@azathoth.lan> <201009210915.46556.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2010/9/21 John Baldwin <jhb@freebsd.org>:
> On Tuesday, September 21, 2010 8:22:24 am Baptiste Daroussin wrote:
>> Hi,
>>
>> For a projects I needed to use EVFILT_FS and saw that it hasn't been doc=
umented
>> so here is a patch to document it http://planet.etoilebsd.net/kqueue.2.d=
iff
>>
>> It is based on the commit message for the implementation of EVFILT_FS, s=
orry I
>> don't know how to better document it
>> (http://lists.freebsd.org/pipermail/cvs-src/2005-September/052288.html)
>
> Hmm, the code for this seems quite broken. =A0For example, when an NFS mo=
unt is
> marked up, it posts an event saying it is down. =A0Right now when the use=
r gets
> an EVFILT_FS event, the info in the event contains a mask of states that =
have
> changed, but the code would still need to issue a VFS_CTL_QUERY sysctl to=
 get
> the actual state. =A0It would be more useful if the kevent could return t=
wo
> values: 1) would be a bitmask of changed flags, and 2) would be the curre=
nt
> state of the vfs query flags. =A0Perhaps 2) could be implemented in kn_da=
ta,
> but we would need to change the kernel to keep the current state of the
> vfs query flags in 'struct mount' (this could be done in vfs_event_signal=
()).
> Doing so would also allow VFS_CTL_QUERY to be implemented generically.
>
>> While using it I also discover that VQ_MOUNT, VQ_UMOUNT, VQ_NOTRESP and
>> VQ_NOTRESPLOCK are not documented either but I don't know where to docum=
ent
>> them.
>
> VFS_CTL_QUERY is not really documented either. =A0For now I think you cou=
ld
> document all of this in kevent(2). =A0At the very least, you should note =
that
> for EVFILT_FS, the 'flags' field is a bitmask of changed flags that can b=
e
> queried via VFS_CTL_QUERY. =A0If the code is changed to provide the curre=
nt
> flags in 'data', then you could just document the flags explicitly and no=
t
> bother mentioning VFS_CTL_QUERY.
>

*Ouch* I'm far from understanding everything, I think I won't be able
to document all that without a real comprehension of it.

At the begining I just wanted to point out that some parts wasn't
documented, and try to document what I could :)

regards,
Bapt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim0XGTHXEYkMqBB%2B8mAMapHTCnYni=LV0645_6K>