From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 3 10:10:16 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D8DE926; Tue, 3 Dec 2013 10:10:16 +0000 (UTC) Received: from mail-ie0-x233.google.com (mail-ie0-x233.google.com [IPv6:2607:f8b0:4001:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C55B15CF; Tue, 3 Dec 2013 10:10:16 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id x13so23224547ief.38 for ; Tue, 03 Dec 2013 02:10:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=zIkOtdgqy59xQjRknMTDiEiEyddVRMjc+dDdc0Q+M6E=; b=BObGc9hO+GjbUWIQrNBcfuH7QH1d+16Ot7l1FtLLrKrwLxKSLlkN3bsUk35hXzypOb tviZgt8RP57ct3VVjdF2jDnpggUBSeVsElPxus45vvVuAIrVnFHWymTg35n5ME/OGYNt 8oJvjVSGcVlmSQ4sZH97fMJTsUELaGbwgJA0pK/H+A0brklTkNW0Egnw3+VMZnq4x/Bg /XYosv7q1wDJKiem+3xsj4holxV1ZEUod55Lz9FyXLTWFE49fN+pxv3IKws3QWbFrRHP mixpoM3PjUZcgqm1S1PN3qpmnnYJlasMl9Px68ZXzY5fOFIQj0WXXZUk3tWmfbg0LeEe 7QAw== MIME-Version: 1.0 X-Received: by 10.50.253.229 with SMTP id ad5mr1756513igd.42.1386065415793; Tue, 03 Dec 2013 02:10:15 -0800 (PST) Received: by 10.50.225.70 with HTTP; Tue, 3 Dec 2013 02:10:15 -0800 (PST) In-Reply-To: <92F46317-D62D-4E19-B687-2A392309A244@mail.turbofuzz.com> References: <718836647.19911209.1385302696963.JavaMail.root@uoguelph.ca> <706707CA-BD52-4814-BCCE-EB044B062BA6@kientzle.com> <92F46317-D62D-4E19-B687-2A392309A244@mail.turbofuzz.com> Date: Tue, 3 Dec 2013 11:10:15 +0100 Message-ID: Subject: Re: Extended Attributes and how to avoid them (was Re: O_XATTR support in FreeBSD?) From: Cedric Blancher To: Jordan Hubbard Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Rick Macklem , Freebsd hackers list , Richard Yao , Pedro Giffuni , Lionel Cons X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 10:10:16 -0000 On 2 December 2013 00:19, Jordan Hubbard wrote: > > On Dec 1, 2013, at 2:05 PM, Lionel Cons wrote: > >> But this discussion is *not* about extended attributes, this >> discussion is about Alternate Data Streams. Unfortunately the O_XATTR >> discussion somehow started to cover the Linux "extended attribute >> system", which is utterly useless in the intended use cases (as said, >> no access through normal POSIX read(), write(), mmap(), no unlimited >> size, no sparse data support (aka SEEK_HOLE, SEEK_DATA) etc etc). > > I think this discussion doesn't really *know* what it's about, frankly, b= ecause there are so many possible avenues to choose from! :-) I thought that had been explained in detail. What's needed here is the O_XATTR solution, which covers CIFS, NTFS, ZFS and NFSv4 functionality, Alternate Stream Garbage collection (this is the use case I've seen in most of nih.gov's work - they use it for application-specific index files which 'disappear' if the file gets deleted) and POSIX api access. Since O_XATTR meets all requirements this would IMHO be the way to go. Additionally ZFS already has O_XATTR functionality, so the main work would be in the FreeBSD vfs layer. I think the work required isn't very big... maybe even the whole discussion already exceeded the amount of work required. > Since you brought up POSIX APIs, let's talk about that for a second. I'v= e worked with EAs "in the field", as it were, a lot (a LOT) and no one duri= ng my long history with them has ever demanded the ability to call read() o= r write() on an EA, to mmap() one, or to store sparse data in one. I would= love to know which apps actually need to do that (and why), because other = than "unlimited size", none of those demands have ever hit any bug database= I've had access to. Well, where did you look? Opensolaris's bug database is no longer public, and so are the Architecture Cases from the days of Solaris 9, which clearly stated the requirements and intended usage. Microsofts bug database is not public either and even the paying audience doesn't see all details (I can say this: Microsofts butt is currently under fire (roasted!) because ADS is disabled by default in ReFS, which in turn caused a lot of stirr and anger). AT&T's work is done on top of libast (which is a platform abstraction and utility library), which either uses the O_XATTR API, attropen() or the Win32 Alternate Data Stream API (so just searching for O_XATTR doesn't give you the search results you'd may expect). The other places to look at would be nih.gov and CERN, but AFAIK both use platform abstraction libraries like libast does, so you'd have to dig around a *lot*. > I'm also generally not one to throw marketing numbers around in a technic= al conversation, but with 72 million seats and over 1 million applications = (and by all means fact-check those numbers), if the ability to use EAs in t= hat fashion were truly necessary, I suspect I would have heard that early a= nd often. You did notice that AT&T Research (to serve their cloud services), nih.gov and CERN did a lot of work related to ADS/O_XATTR in the last three years? > I'll opine that If FreeBSD really wants to support EAs in a "useful enoug= h" way, then the best way of doing so is to stay focused on the pragmatic "= this our usage cases, and we are not afraid to describe them in detail!" si= de of the street because, as I said, the academic discussions generally don= 't lead anywhere but in circles. A pragmatic approach will, conversely, l= ead to doing just the basic minimums and not waste time implementing anythi= ng that won't actually be needed in real-world scenarios. That ship already sailed off long ago (likely with Solaris 10 when NFSv4 with Alternate Data Streams/O_XATTR was introduced) - its in use now with a lot of applications. Ced --=20 Cedric Blancher Institute Pasteur