Date: Mon, 2 Feb 2015 11:30:27 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Eric Badger <eric@badgerio.us> Cc: freebsd-current@freebsd.org Subject: Re: Filepaths in VM map for tmpfs files Message-ID: <20150202093027.GL42409@kib.kiev.ua> In-Reply-To: <54CEE325.4040903@badgerio.us> References: <54CCEFAB.9040406@badgerio.us> <20150131153621.GH42409@kib.kiev.ua> <54CEE325.4040903@badgerio.us>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 01, 2015 at 08:38:29PM -0600, Eric Badger wrote: > > On 01/31/2015 09:36 AM, Konstantin Belousov wrote: > > First, shouldn't the kve_type changed to KVME_TYPE_VNODE as well ? > My thinking is no, because KVME_TYPE_SWAP is in fact the correct type; > I'd opine that it is better to be transparent than make it look like > there is an OBJT_VNODE object there. It may be that some programs would > be confused by VNODE info returned on a SWAP type mapping, though I know > that dtrace handles it OK. kve_vn_* and kve_path fields are defined only for KVME_TYPE_VNODE kve_type. So this is in fact a bug in whatever used the API to access kve_path for KVE_TYPE_SWAP. > > > Second, note that it is possible that the vnode is recycled, so > > OBJ_TMPFS flag is cleared for tmpfs swap object. The OBJ_TMPFS_NODE > > flag is still set then. I am not sure what to do in this case, > > should the type changed to KVME_TYPE_VNODE still, but kve_vn_* > > fields left invalid ? > I think if we changed to KVME_TYPE_VNODE in some cases, it should be > done in all cases, even if the vnode has been recycled (but leave vp == > NULL in that case). Though if it is left as KVME_TYPE_SWAP, then that > concern goes away on its own. Concern is not vp == NULL, but the fact that kve_vn* cannot be filled, there is simply no (easy) way to fetch this information.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150202093027.GL42409>