From owner-svn-src-head@FreeBSD.ORG Tue Apr 14 19:17:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2234E106577F; Tue, 14 Apr 2009 19:17:58 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BDBE48FC1F; Tue, 14 Apr 2009 19:17:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id AB4D646B64; Tue, 14 Apr 2009 15:17:56 -0400 (EDT) Date: Tue, 14 Apr 2009 20:17:56 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Tim Kientzle In-Reply-To: <49E4D2BF.2040503@freebsd.org> Message-ID: References: <200904141139.n3EBdudA004806@svn.freebsd.org> <49E4D2BF.2040503@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala Subject: Re: svn commit: r191055 - head/lib/libc/string X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 14 Apr 2009 19:17:59 -0000 On Tue, 14 Apr 2009, Tim Kientzle wrote: >> There is no way for strmode(3) to append '+' if the file has ACL, >> because there is no way to figure that out based on the file mode >> itself. Make the manual page match reality. > > Yep, that '+' is why libarchive has a custom strmode() that accepts more > information than just the mode. > > A related issue: It would be really nice to be able to find out whether a > file had extended ACLs or extended attributes based on the information > returned from stat(2). That would allow programs like tar to avoid a fair > number of system calls. Even just a single bit "HAS_EXTENSIONS" would help a > lot, since most files don't have any extended ACLs or extended attributes. > It would also allow users of strmode() (such as ls) to insert that '+' sign > themselves. > > The only place I see to do this is to appropriate some bits from st_flags. Kirk, Poul-Henning, and I discussed precisely this during the initial UFS2 design session. The idea was that we'd allocate a system flag that was essentially a "there are ACL-related extended attributes", which could be used in-kernel to avoid EA reads, and from userspace to avoid (or trigger) ACL reads. I still think it would be a good idea to do this, although we might want to think a bit about failure modes if there's a crash between EA update and inode update. Robert N M Watson Computer Laboratory University of Cambridge