From owner-svn-src-head@freebsd.org Tue Aug 1 04:04:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F043FDC919E; Tue, 1 Aug 2017 04:04:46 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from heemeyer.club (heemeyer.club [108.61.204.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C52B576C9B; Tue, 1 Aug 2017 04:04:46 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from mordor.heemeyer.club (dchagin.static.corbina.ru [78.107.232.239] (may be forged)) by heemeyer.club (8.15.2/8.15.1) with ESMTPS id v713hmA6029901 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 Aug 2017 03:43:49 GMT (envelope-from dchagin@mordor.heemeyer.club) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] (may be forged) claimed to be mordor.heemeyer.club Received: from mordor.heemeyer.club (localhost [127.0.0.1]) by mordor.heemeyer.club (8.15.2/8.15.1) with ESMTPS id v713hfCC036505 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 1 Aug 2017 06:43:41 +0300 (MSK) (envelope-from dchagin@mordor.heemeyer.club) Received: (from dchagin@localhost) by mordor.heemeyer.club (8.15.2/8.15.2/Submit) id v713hfKm036504; Tue, 1 Aug 2017 06:43:41 +0300 (MSK) (envelope-from dchagin) Date: Tue, 1 Aug 2017 06:43:40 +0300 From: Chagin Dmitry To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321839 - in head: share/man/man4 share/man/man5 sys/fs/fdescfs sys/kern sys/sys Message-ID: <20170801034340.GA36494@mordor.heemeyer.club> References: <201708010340.v713eJVp002477@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201708010340.v713eJVp002477@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 01 Aug 2017 04:04:47 -0000 On Tue, Aug 01, 2017 at 03:40:19AM +0000, Dmitry Chagin wrote: > Author: dchagin > Date: Tue Aug 1 03:40:19 2017 > New Revision: 321839 > URL: https://svnweb.freebsd.org/changeset/base/321839 > > Log: > Implement proper Linux /dev/fd and /proc/self/fd behavior by adding > Linux specific things to the native fdescfs file system. > > Unlike FreeBSD, the Linux fdescfs is a directory containing a symbolic > links to the actual files, which the process has open. > A readlink(2) call on this file returns a full path in case of regular file > or a string in a special format (type:[inode], anon_inode:, etc..). > As well as in a FreeBSD, opening the file in the Linux fdescfs directory is > equivalent to duplicating the corresponding file descriptor. > > Here we have mutually exclusive requirements: > - in case of readlink(2) call fdescfs lookup() method should return VLNK > vnode otherwise our kern_readlink() fail with EINVAL error; > - in the other calls fdescfs lookup() method should return non VLNK vnode. > > For what new vnode v_flag VV_READLINK was added, which is set if fdescfs has beed > mounted with linrdlnk option an modified kern_readlinkat() to properly handle it. > > For now For Linux ABI compatibility mount fdescfs volume with linrdlnk option: > > mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd > > Reviewed by: kib@ > MFC after: 1 week > Relnotes: yes Differential Revision: https://reviews.freebsd.org/D11452