RFC: possible issue with kqueue

Gleb Popov arrowd at freebsd.org
Sat Apr 3 07:43:46 UTC 2021


On Wed, Mar 31, 2021 at 8:46 AM Damjan Jovanovic <damjan.jov at gmail.com>
wrote:

> On Tue, Mar 30, 2021 at 8:14 PM John-Mark Gurney <jmg at funkthat.com> wrote:
>
> > Emanuel Haupt wrote this message on Sat, Mar 27, 2021 at 13:10 +0100:
> > > Can someone familiar with kqueue please comment on:
> > >
> > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254024
> >
> > Done:
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254024#c11
> >
> > Looks like the user wasn't force unmounting the FS.  There really
> > isn't any problem w/ kqueue, as a normal unmount is expected to be
> > refused while files are open.
> >
> > I guess there COULD be a new flag added to file descriptors that
> > flag them as being able to be closed upon unmount.  Then when an
> > unmount happens and only these flagged files remain, they are closed
> > allowing the fs to unmount.  But this is a new feature and independent
> > of kqueue.
> >
> > --
> >   John-Mark Gurney                              Voice: +1 415 225 5579
> >
> >
> >
> Linux's inotify avoids this problem by monitoring filesystem paths instead
> of file descriptors, which also has the advantage of not contributing to
> the open file limit. Can we do something like that?
>

The "O_PATH" flag support is being cooked in
https://reviews.freebsd.org/D29323 , maybe it'd be possible to build
something upon it.

However, I was under the impression that the Linux advantage is the ability
to set a single watch on a whole directory, while kqueue requires opening
each file.



On Sat, Apr 3, 2021 at 6:22 AM Rozhuk Ivan <rozhuk.im at gmail.com> wrote:

>
> https://reviews.freebsd.org/D19690
>
> I do not finish this.
> Plan was: implement this and catch unmount notify in my FAM, that in
> glib20.
>

Hum, but I do see mount/unmount events in devd on CURRENT!


More information about the freebsd-hackers mailing list