Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Feb 2016 19:02:28 -0500 (EST)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Ken Merry <ken@freebsd.org>
Cc:        fs@freebsd.org, scsi@freebsd.org
Subject:   Re: FUSE extended attribute patches available
Message-ID:  <1740288370.14765302.1456790548437.JavaMail.zimbra@uoguelph.ca>
In-Reply-To: <CD5FCB90-1952-4014-BBE0-1BFF1EF85E17@freebsd.org>
References:  <CD5FCB90-1952-4014-BBE0-1BFF1EF85E17@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Ken Merry wrote:
> I have patches for FreeBSD=E2=80=99s FUSE filesystem kernel module to sup=
port
> extended attributes:
>=20
> https://people.freebsd.org/~ken/fuse_extattr.20160229.1.txt
>=20
> The patch implements the get/set/delete/list extended attribute methods. =
 The
> listing code also converts extended attribute lists from the Linux/FUSE
> format to the FreeBSD format.
I also have patches, although my list didn't work. (I didn't know that ther=
e was
a difference between what Linux/FUSE returns vs what FreeBSD wanted. So now=
 I know
why my "list" didn't work.)
Btw, when I discussed what to do w.r.t. extended attribute namespace, he se=
emed to
think just considering all the fuse ones as User was ok.

I also have patched FreeBSD's Fuse for the other stuff needed to export the=
 fuse
mount via an NFS server. (VFS_FHTOVP() etc) These aren't quite ready for "p=
rime time"
but if anyone wants to try them, just email me and I'll send you a copy.

Btw, I have a couple of patches related to direct I/O and buffered I/O. You=
 can
find 2 of these at PR#206238. I also patched fuse_vnop_inactive() to flush/=
write
dirty pages. (I think this is needed when an application mmaps a file and t=
he
modifies it after closing the file descriptor. I haven't actually tested to=
 see
if this fix is needed, so I haven't put it anywhere yet.)

>  For example:
>=20
> # touch foo
> # ls -la foo
> -rwxrwxrwx  1 root  wheel  0 Feb 29 21:40 foo
> # lsextattr user foo
> foo
> # setextattr user testattr1 "12345678" foo
> # lsextattr user foo
> foo     testattr1
> # getextattr user testattr1 foo
> foo     12345678
> # setextattr user testattr2 "87654321" foo
> # lsextattr user foo
> foo     testattr2       testattr1
> # rmextattr user testattr1 foo
> # lsextattr user foo
> foo     testattr2
> # getextattr user testattr1 foo
> getextattr: foo: failed: Attribute not found
> # getextattr user testattr2 foo
> foo     87654321
>=20
>=20
> Just to be clear on what this does, it only provides extended attribute
> support to FreeBSD applications if the underlying FUSE filesystem impleme=
nts
> FUSE extended attribute support.  Many FUSE filesystems don=E2=80=99t sup=
port the
> extended attribute VFS operations.
>=20
> I have tested this out on IBM=E2=80=99s LTFS implementation, but I have n=
ot yet found
> another FUSE filesystem that supports extended attributes.  If anyone kno=
ws
> of one, please let me know so I can try it out.  (I looked through a numb=
er
> of the filesystems in sysutils/fusefs* in the ports tree.)
>=20
The FreeBSD GlusterFS port includes a fuse interface that supports extended
attributes. That is how I tested what I have. (I think the port is now in
svn, but if not you can find the GlusterFS port at PR#194409.)
It glusterfs.org doc doesn't mention that you can create/test a volume of
only one brick, but that works for trivial testing. If you decide to use it
for testing and have trouble getting it going, just email. I know diddly ab=
out
GlusterFS, but I have fired it up a few times.

> Any feedback is welcome.  I=E2=80=99m planning to check this into FreeBSD=
/head in the
> next week or so.
>=20
I'll try to get around and taking a look to see if there is anything differ=
ent
than what I did (other than the above "list" case I didn't get right;-).

rick

> Obviously, I=E2=80=99ve also ported IBM=E2=80=99s LTFS implementation to =
FreeBSD.  It works
> in the standard FUSE mode, and you can also link it into an application a=
s a
> library if you don=E2=80=99t want to incur the overhead of running throug=
h FUSE.  I
> haven=E2=80=99t gotten around to packaging it up to go out for testing / =
review.
>=20
> If anyone has IBM LTO-5 or newer tape drives, or IBM TS1140 or newer tape
> drives, and wants to try it out, let me know.  I=E2=80=99ll send you the =
code when
> I=E2=80=99ve got it at least somewhat ready.  This is IBM-specific, and w=
on=E2=80=99t work
> on HP tape drives.
>=20
> Ken
> =E2=80=94
> Ken Merry
> ken@FreeBSD.ORG
>=20
>=20
>=20
> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1740288370.14765302.1456790548437.JavaMail.zimbra>