From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 23 23:48:39 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11970C75; Sat, 23 Nov 2013 23:48:39 +0000 (UTC) Received: from mail.crittercasa.com (mail.turbofuzz.com [208.87.221.144]) by mx1.freebsd.org (Postfix) with ESMTP id E1001223F; Sat, 23 Nov 2013 23:48:38 +0000 (UTC) Received: from [10.20.30.117] (248.sub-70-197-7.myvzw.com [70.197.7.248]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.crittercasa.com (Postfix) with ESMTPS id B75F8164874; Sat, 23 Nov 2013 15:41:38 -0800 (PST) Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1812\)) Subject: Re: O_XATTR support in FreeBSD? From: Jordan Hubbard In-Reply-To: <820263347.19772534.1385247218007.JavaMail.root@uoguelph.ca> Date: Sat, 23 Nov 2013 15:41:37 -0800 Message-Id: References: <820263347.19772534.1385247218007.JavaMail.root@uoguelph.ca> To: Rick Macklem X-Mailer: Apple Mail (2.1812) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: Freebsd hackers list , Richard Yao , Pedro Giffuni , Cedric Blancher X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Nov 2013 23:48:39 -0000 On Nov 23, 2013, at 2:53 PM, Rick Macklem wrote: > Interestingly, FreeBSD has a VOP_OPENEXTATTR() but no syscall > that uses it nor support for it in ZFS. (I'm just guessing it > was intended for an openat(2) syscall at some time?) > Btw Cedric, if you had mentioned "subfiles" or "fork files" in your > subject line, you might have gotten a better answer. I, for one, > didn't know what O_XATTR is. I also always get confused w.r.t. what > to call these beasts. (NFSv4 calls the named attributes.) >=20 > Btw, apps can use extended attributes (the limited sized > atomically stored/read kind). They aren't just for > storing ACLs. Sigh. Extended Attributes. :-/ I guess I=92ll raise my head in this discussion. They=92ve certainly = been the bane of my existence for long enough! First, supporting EAs properly really involves multiple levels of the = Unix command and library stack. The filesystem can support them natively, sure, but that=92s actually = somewhat optional since you can always (cough cough) stick them in a = side-store if the rest of the stack cooperates. That=92s where the = awesome AppleDouble files came from (=93._weirdfile" corresponding to = =93weirdfile") which remain useful even after filesystems like = HFS/ZFS/UFS became EA-aware natively because there=92s always those = foreign data stores to talk to (some early AFP/CIFS/NFS mount, for = example) and the fact that you still need to *serialize* the dang things = into tar / cpio / zip / ??? files as well as across network replication = with tools like rsync. What good is an EA, much less an ACL that=92s = been stored in an EA, if it gets stripped off the first time you tar up = a directory and extract it somewhere else? So I wouldn=92t start with NFSv4 or ZFS if I was asking the question. I = would start with libc and ask if it had anything similar to copyfile(3) = so that the tools above it could start actually supporting those = attributes on a *practical* basis! :) - Jordan