From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 8 23:10:47 2014 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 56886BCC; Mon, 8 Sep 2014 23:10:47 +0000 (UTC) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 07B9B2BF; Mon, 8 Sep 2014 23:10:46 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcEABU3DlSDaFve/2dsb2JhbABZg2BXBIJ4xnwKhnlTAYEreIQEAQEEAQEBICsgCxsOCgICDRkCKQEJJgYIBwQBHASIIQ2nXJVmAReBLI1QAQEbNAeCeYFTBZVwg3+EYopEiQmDfSEvB4EIOYEHAQEB X-IronPort-AV: E=Sophos;i="5.04,489,1406606400"; d="scan'208";a="152555800" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 08 Sep 2014 19:10:44 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 6B63B792A8; Mon, 8 Sep 2014 19:10:44 -0400 (EDT) Date: Mon, 8 Sep 2014 19:10:44 -0400 (EDT) From: Rick Macklem To: John Baldwin Message-ID: <755175739.33844219.1410217844431.JavaMail.root@uoguelph.ca> In-Reply-To: <2154953.PmiECqQQIi@ralph.baldwin.cx> Subject: Re: Tool to access ZFS/NFSv4 alternate data streams on FreeBSD? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.209] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) Cc: freebsd-hackers@freebsd.org, Richard Yao , Jordan Hubbard , Lionel Cons , Jan Bramkamp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 23:10:47 -0000 John Baldwin wrote: > On Friday, September 05, 2014 06:13:10 PM Rick Macklem wrote: > > Lionel Cons wrote: > > > On 5 September 2014 19:26, Richard Yao wrote: > > > > On 09/05/2014 11:35 AM, Jan Bramkamp wrote: > > > >> On 05.09.2014 16:25, Lionel Cons wrote:> Is there any tool > > > >> which > > > >> can be > > > >> used to access ZFS and NFSv4 alternate > > > >> > > > >>> data streams on FreeBSD? > > > >> > > > >> Are you looking for lsextattr(8) and getextattr(8)? > > > >> _______________________________________________ > > > >> freebsd-hackers@freebsd.org mailing list > > > >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > > >> To unsubscribe, send any mail to > > > >> "freebsd-hackers-unsubscribe@freebsd.org" > > > > > > > > Do you mean Solaris extended attributes? Those tend to be > > > > called > > > > resource forks on other platforms. Unifying extended attributes > > > > and > > > > resource forks was clever. > > > > > > Yes, they are also called resource forks, or alternate data > > > streams. > > > The attribute files which can be accessed via O_XATTR or cd -@ > > > file/dir on newer ksh/ksh93/bash revisions. > > > > For FreeBSD's NFSv4 the answer is definitely no. Because the > > Linux/FreeBSD > > style setextattr() assumes an atomic replacement of the extended > > attribute, > > it is not semantically compatible (ie. cannot be accurately > > emulated) by > > resource forks. > > > > I do not know of any work for ZFS on FreeBSD w.r.t. this, but I'm > > not a > > ZFS guy. > > Does the NFSv4 protocol support resource forks as a separate entity > from EAs > though? Presumably O_XATTR would turn into a new VOP (VOP_OPENFORK() > or some > such), it wouldn't be shoehorned into the EA APIs. > Yep, that could be done quite easily, from the NFSv4 perspective. NFSv4 calls it Openattr. It isn't completely obvious if NFSv4 supports this recursively (ala Solaris) or only one level deep, but no one seems to care much about the recursive case. Last time this came up for discussion, Jordan Hubbard got quite involved along the lines of ``most of the work is in userland, for archive tools, etc``. I can`t remember what the mailing list thread was called, but it was started by a guy who was a ``resource fork`` advocate (associated with CERN if I recall), where they use Gbyte extended attributes. If others decide to add the VOP calls and make them work for ZFS, I could easily wire in the NFSv4 bits. rick > -- > John Baldwin >