Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2018 18:59:16 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r335690 - head/sys/kern
Message-ID:  <CANCZdfpdBOin=w0qEGXM%2BciTAbETezYTOPq1nuEV1pT5QATEHA@mail.gmail.com>
In-Reply-To: <20180627235216.GO1165@FreeBSD.org>
References:  <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff <glebius@freebsd.org> wrote:

> On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote:
> W> Author: imp
> W> Date: Wed Jun 27 04:11:09 2018
> W> New Revision: 335690
> W> URL: https://svnweb.freebsd.org/changeset/base/335690
> W>
> W> Log:
> W>   Fix devctl generation for core files.
> W>
> W>   We have a problem with vn_fullpath_global when the file exists. Work
> W>   around it by printing the full path if the core file name starts with
> /,
> W>   or current working directory followed by the filename if not.
>
> Is this going to work when a core is dumped not at current working
> directory,
> but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core
>

Yes. That works.


> Looks like the vn_fullpath_global needs to be fixed rather than problem
> workarounded.
>

It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a
name. The only reason we're able to at all is due to the name cache. And
when we recreate a file, we invalidate the name cache. And even if we fixed
that, there's no guarantee the name cache won't get flushed before we
translate the name.... Linux can do this because it keeps the path name
associated with the inode. FreeBSD simply doesn't.

Warner



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