Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Apr 2021 10:43:16 +0300
From:      Gleb Popov <arrowd@freebsd.org>
To:        Damjan Jovanovic <damjan.jov@gmail.com>, Rozhuk Ivan <rozhuk.im@gmail.com>
Cc:        hackers@freebsd.org
Subject:   Re: RFC: possible issue with kqueue
Message-ID:  <CALH631mwWZBGiKhz3FAcL=dEQyYDM%2B7Z8Gc2H9VNMEh5dNfysA@mail.gmail.com>
In-Reply-To: <CAJm2B-kbkJPUHiurCfYsOmrCFSNPBD74FYsHsuNNdOVC6F4C%2BQ@mail.gmail.com>
References:  <20210327131011.e16291cac86475e75a33812c@FreeBSD.org> <20210330181402.GM14975@funkthat.com> <CAJm2B-kbkJPUHiurCfYsOmrCFSNPBD74FYsHsuNNdOVC6F4C%2BQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 31, 2021 at 8:46 AM Damjan Jovanovic <damjan.jov@gmail.com>
wrote:

> On Tue, Mar 30, 2021 at 8:14 PM John-Mark Gurney <jmg@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@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!



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