Date: Mon, 7 Mar 2016 11:19:47 -0500 From: "Kenneth D. Merry" <ken@FreeBSD.ORG> To: Julian Elischer <julian@freebsd.org> Cc: Rick Macklem <rmacklem@uoguelph.ca>, Robert Watson <rwatson@freebsd.org>, fs@freebsd.org, scsi@freebsd.org Subject: Re: FUSE extended attribute patches available Message-ID: <20160307161947.GB3501@mithlond.kdm.org> In-Reply-To: <56DD2AB6.1030407@freebsd.org> References: <CD5FCB90-1952-4014-BBE0-1BFF1EF85E17@freebsd.org> <800018199.6694281.1457233600357.JavaMail.zimbra@uoguelph.ca> <56DD2AB6.1030407@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160307161947.GB3501>