From owner-svn-src-head@freebsd.org Thu Jun 28 00:59:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77106102226C for ; Thu, 28 Jun 2018 00:59:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 133837CAC1 for ; Thu, 28 Jun 2018 00:59:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id q4-v6so3617487iob.2 for ; Wed, 27 Jun 2018 17:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=M1fOcgcU3OGgBM4fJDxJGmnOo+/jp648iV/weX/gJIc=; b=dpD5U9dfWXV//63PefC0pnSZfxtJZimMVXlxgZM9+k8XVmHwm2AsCuPOUpMyccCXLd CmjfQuzDk25JSYZn/E85MyVV76x+tam/rjmuvuM/Ldzg4+f2mLtLuVpX3LTy0AXiNa9g vrJRKk+Ob+Hw+jRT8ncuTUIouciYZHO59JxQKEkl+JZ2wMoFFzb7d1BOE9GedUfWiUab VLhuAHj7iMtNHMwr3yqayCoEGLfqGlEgIQutlf821muqR0uhEoTIqV9YCaBtkQjDxkUa XUVRJUXETZWA8mfU8OxZQGXs7iipYXU8aDJ073SJadaKTw39ot7wEoP7RrcTPL5IYxQh yY+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=M1fOcgcU3OGgBM4fJDxJGmnOo+/jp648iV/weX/gJIc=; b=XcUrZ/nIa7XTz0dVwH0OOfWKaN5zFkeBlJ3adabrmjrWPhfnnqqqhBphLFNJb2zQN+ RDW2OWktvrBtBxYY/9SGIHe75a5nGg2OQ4cAgYyQCPQe08rXZht5mRIywutGTMCDxrQ5 vxEh1gOMzh2YAC0soc43OtE4hoES7PGHUSZXMbE+jBVqLn9NbafPEGlzZIpby3oCePi8 JMDQ1hwyOW0OU6OuvMyOajUig942DOhTmt7DqPB5pGxi1eNL1TXuqgCJ9eDHuqw6whZW 66KuHVjIPBQ9cIBj+ksWhBaIg8LONSZ9h88za8bHzC/0327kexYxpAMA5oJcU1UUAh/Z klwA== X-Gm-Message-State: APt69E3h/3HFsY0K0plzZ4L8XwKQqR/re9LrdC5i4zkDu4QW9c3kFQ3R o7eYs3BIVI69+MqYBcTUrPv9u3JsVqsrr3Qi4jENyQ== X-Google-Smtp-Source: AAOMgpcrVMr7N3/1EPH/ISiAiHzExL+Kjj1G1QThOyltdUKtOqE6dktALVZLF0n4DMxn4DVN2NZkpVyUVOU882DA0jk= X-Received: by 2002:a6b:d40c:: with SMTP id l12-v6mr6981819iog.37.1530147557032; Wed, 27 Jun 2018 17:59:17 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 17:59:16 -0700 (PDT) X-Originating-IP: [71.229.234.69] In-Reply-To: <20180627235216.GO1165@FreeBSD.org> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org> From: Warner Losh Date: Wed, 27 Jun 2018 18:59:16 -0600 X-Google-Sender-Auth: UuVTDEbodkD0gjjRDxL_SBhunMc Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Gleb Smirnoff Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 00:59:18 -0000 On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff 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