From owner-freebsd-fs@FreeBSD.ORG Sat Mar 22 19:41:49 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DABF71065672; Sat, 22 Mar 2008 19:41:49 +0000 (UTC) (envelope-from v.haisman@sh.cvut.cz) Received: from service1.sh.cvut.cz (service1.sh.cvut.cz [147.32.127.214]) by mx1.freebsd.org (Postfix) with ESMTP id 6A2418FC1A; Sat, 22 Mar 2008 19:41:49 +0000 (UTC) (envelope-from v.haisman@sh.cvut.cz) Received: from localhost (localhost [127.0.0.1]) by service1.sh.cvut.cz (Postfix) with ESMTP id 7BF1B123723; Sat, 22 Mar 2008 20:19:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at service1.sh.cvut.cz X-Spam-Score: -0.077 X-Spam-Level: X-Spam-Status: No, score=-0.077 tagged_above=-255 required=5 tests=[AWL=0.323, CRM114_HAM_00=, JR_RCVD_TOO_FEW_HOPS=0.6] Received: from service1.sh.cvut.cz ([127.0.0.1]) by localhost (service1.sh.cvut.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Imynv7Eu5DFt; Sat, 22 Mar 2008 20:19:35 +0100 (CET) Received: from [192.168.1.2] (r4v24.net.upc.cz [84.42.149.24]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by service1.sh.cvut.cz (Postfix) with ESMTP id 38BB6123725; Sat, 22 Mar 2008 20:19:35 +0100 (CET) Message-ID: <47E55BC1.9080707@sh.cvut.cz> Date: Sat, 22 Mar 2008 20:19:29 +0100 From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Robert Watson References: <47E43496.5080201@sh.cvut.cz> <20080322180253.B27442@fledge.watson.org> In-Reply-To: <20080322180253.B27442@fledge.watson.org> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig94CD03F1E67C4A600BF661CD" Cc: freebsd-fs@freebsd.org Subject: Re: Indication of extended attributes availability. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2008 19:41:50 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig94CD03F1E67C4A600BF661CD Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Robert Watson wrote, On 22.3.2008 19:05: >=20 > On Fri, 21 Mar 2008, V=C3=A1clav Haisman wrote: >=20 >> I would like to have some sort of indication of extended attributes=20 >> availability for given FS. It seems that things like this (MAC, ACLs=20 >> etc.) are indicated using mount flags and those are available through = >> statfs() call. The following is tentative patch that would expose=20 >> extended attributes availability as mount flag. It is completely=20 >> untested. I would just like to know if it is a viable approach to the = >> problem or should I scratch it and try something else? >=20 > I think the preferred programmatic approach is actually via=20 > fpathconf(2). I don't know if any other OS's have assigned a _PC=20 > constant for extended attributes, but if they have we should probably=20 > use the same one. However, I guess there's a meta-question: is your=20 > goal to allow programs to be able to tell if extended attributes are=20 > available, or for administrators to be able to tell? >=20 My original intent was to just extend /bin/cp with switch that would allo= w=20 copying of extended attributes together with the contents of files. When = I=20 looked at its source I noticed that it uses fpathconf() for querying for = ACLs=20 capability. Because I have not found extended attributes in fpathconf(2) = I=20 have looked at statfs(2) but there is nothing there either. So I thought = the=20 information would have to be conveyed to either of the syscalls somehow. = The=20 mnt_flag field of struct mount seems like a logical place to put the=20 information into. From there it seems it could be used by either fpathcon= f()=20 or statfs() or both. So, to answer the question, the goal is to allow programs to detect exten= ded=20 attributes availability. As to what other OSes do, Solaris mentions _PC_XATTR_ENABLED and=20 _PC_XATTR_EXISTS in fpathconf(2). -- VH --------------enig94CD03F1E67C4A600BF661CD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH5VvIoUFWwtEPkHIRCACQAJ9fbZi+VN0qAEAhTKcNqiEFcaP/MACfdNXf wBW21UqyQWN0aPGr5yhEfPU= =75tu -----END PGP SIGNATURE----- --------------enig94CD03F1E67C4A600BF661CD--