From owner-freebsd-fs@freebsd.org Mon Mar 7 16:19:50 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8CBEAC3DA8 for ; Mon, 7 Mar 2016 16:19:49 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id CC05DB79 for ; Mon, 7 Mar 2016 16:19:49 +0000 (UTC) (envelope-from ken@kdm.org) Received: by mailman.ysv.freebsd.org (Postfix) id C43E1AC3DA6; Mon, 7 Mar 2016 16:19:49 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3AEAAC3DA4; Mon, 7 Mar 2016 16:19:49 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 77301B75; Mon, 7 Mar 2016 16:19:49 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (localhost [127.0.0.1]) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPS id u27GJlr8004486 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 7 Mar 2016 11:19:47 -0500 (EST) (envelope-from ken@mithlond.kdm.org) Received: (from ken@localhost) by mithlond.kdm.org (8.15.2/8.14.9/Submit) id u27GJl2A004485; Mon, 7 Mar 2016 11:19:47 -0500 (EST) (envelope-from ken) Date: Mon, 7 Mar 2016 11:19:47 -0500 From: "Kenneth D. Merry" To: Julian Elischer Cc: Rick Macklem , Robert Watson , fs@freebsd.org, scsi@freebsd.org Subject: Re: FUSE extended attribute patches available Message-ID: <20160307161947.GB3501@mithlond.kdm.org> References: <800018199.6694281.1457233600357.JavaMail.zimbra@uoguelph.ca> <56DD2AB6.1030407@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56DD2AB6.1030407@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [127.0.0.1]); Mon, 07 Mar 2016 11:19:47 -0500 (EST) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mithlond.kdm.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2016 16:19:50 -0000 On Sun, Mar 06, 2016 at 23:16:06 -0800, Julian Elischer wrote: > On 5/03/2016 7:06 PM, Rick Macklem wrote: > > Ken Merry wrote: > >> I have patches for FreeBSD???s FUSE filesystem kernel module to support > >> extended attributes: > oh showing off your masochistic side eh? I suppose so; it was rather slow going to figure out the interface. More documentation on the interface would be helpful. Even a more clearly structured interface would be helpful. > >> https://people.freebsd.org/~ken/fuse_extattr.20160229.1.txt > >> > I spent an hour beating my head against fuse yesterday. > then realised that it's an old version on our product. We really have > to get off 8.0 > (hopefully a matter of weeks now to a 10.x switch) > Now all I need is to find a FreeBSD filesystem expert > (ZFS/NFS/CIFS/GFS) to hire. I'm sure you know a few, you'll just have to persuade someone. > > The only bit of code I have that might be useful for this patch is: > > case FUSE_GETXATTR: > > case FUSE_LISTXATTR: > > ! /* > > ! * These can have varying response lengths, and 0 length > > ! * isn't necessarily invalid. > > ! */ > > ! err = 0; > > *** I came up with this: > > fgin = (struct fuse_getxattr_in *) > > ((char *)ftick->tk_ms_fiov.base + > > sizeof(struct fuse_in_header)); > > if (fgin->size == 0) > > err = (blen == sizeof(struct fuse_getxattr_out)) ? 0 : > > EINVAL; > > else > > err = (blen <= fgin->size) ? 0 : EINVAL; > > break; > > I think I got the size check right? > > > > The big question is... > > What to do with the NAMESPACE? > > - My code fails for SYSTEM and does USER without prepending "user.". > > (That seemed to be what rwatson@ felt was reasonable. I thought our > > discussion was on a mailing list, but I can't find it.) > > I've cc'd him. Maybe he can comment again. > Is there a standard for extended attributes I should knwo about? > It seems to me that it's a bit like the wild west. > Extended attributes seem to be "every OS for himself". It does appear to be somewhat OS-dependent. Ken -- Kenneth Merry ken@FreeBSD.ORG