From owner-svn-src-all@freebsd.org Thu Jun 28 00:59:18 2018 Return-Path: Delivered-To: svn-src-all@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 7581D102226B for ; Thu, 28 Jun 2018 00:59:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (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 133E97CAC2 for ; Thu, 28 Jun 2018 00:59:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id l19-v6so3616642ioj.5 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=V0ec2li7k0EA35ka7lNU/AW8IzbDBhodyZJ2VlThQ05Gsfi85GHrEHHXX7peVp4ZPE 5NIo7vHz/XnYMK3GY047liDXcnX7r5qBDvXJ08LiaZNiyTo2WLxX4HTJuRWhDYdQ+ALa 4+Fz5QuXRDnz7OhIEVc4hYXvnt/EG1DTUyaYR6J5x12SFLq0byHCRu30eH9dj3pr3YHp Zwu8xjLMBhiYVfVg8Z8Ho9Qqa8DXRMcRxyESLZEIPZixrsmGAiAqL08WBTKI0xaHPLbE fMREUUm0wBWTzyMZwS+TDSQ1yHEO1A4Nxq3Kp94tFAtcTOt7wxh78L3zVJN6Oe254PnV mwzg== X-Gm-Message-State: APt69E11jqm13OahgDcxhXR/7reEUyPtsw4rmgb5GxM2q1JFFztHzzJA SKQVjuDWE56JlJdUb/E27NbazzE1D1eaY5QXBcNQkg== 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-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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