Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Nov 2015 10:30:06 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Conrad Meyer <cem@FreeBSD.org>
Cc:        Ivan Radovanovic <radovanovic@gmail.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Detecting new file name after receiving kevent's NOTE_RENAME
Message-ID:  <20151112083006.GH2257@kib.kiev.ua>
In-Reply-To: <CAG6CVpVTVK3G4uNmwmcur6c_ckU2n7BhE=5krXscVfn9FQ_LgA@mail.gmail.com>
References:  <5641A2A5.7070909@gmail.com> <20151110081421.GL2257@kib.kiev.ua> <56426054.2070007@gmail.com> <20151111105656.GX2257@kib.kiev.ua> <CAG6CVpUV4=6ZZnfXJnnkmFFV2gQrktxBUa73dK6EWrsYb6=V7w@mail.gmail.com> <20151111193612.GG2257@kib.kiev.ua> <CAG6CVpVTVK3G4uNmwmcur6c_ckU2n7BhE=5krXscVfn9FQ_LgA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 11, 2015 at 12:01:22PM -0800, Conrad Meyer wrote:
> On Wed, Nov 11, 2015 at 11:36 AM, Konstantin Belousov
> <kostikbel@gmail.com> wrote:
> > VOP_VPTOCNP() still must get the data somewhere. It is usually easy to
> > provide the name for a synthetic file system, where the data is fully
> > controlled by the filesystem. Also, it is always possible to provide the
> > name for a directory on any unix-like filesystem, due to dotdot. Both
> > cases are what handled by fs-specific implementations of VOP_VPTOCNP()
> > and by the default code.
> >
> > For the rest, you e.g. must be able to answer with the name for regular
> > inode on UFS, given the inode number. If you can provide such code, I
> > will be quite amazed.
> 
> I'm not sure what you're talking about.  To have a NOTE_RENAME monitor
> as originally discussed, the userspace program must have an fd open to
> the vnode.  With a vnode, the boring generic vn_fullpath and
> vop_stdvptocnp can find a whole path using .. and directory traversal.
> It may not be fast, but it is possible.

I have no idea what you are talking about either.  How dotdot algorithm
can be used to find the parent directory for a regular inode ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151112083006.GH2257>