Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Sep 2014 17:56:28 +0200
From:      Simon Toedt <simon.toedt@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Rick Macklem <rmacklem@uoguelph.ca>, Cedric Blancher <cedric.blancher@gmail.com>, freebsd-hackers@freebsd.org, Richard Yao <ryao@gentoo.org>, Pedro Giffuni <pfg@freebsd.org>, Lionel Cons <lionelcons1972@gmail.com>, Jordan Hubbard <jkh@mail.turbofuzz.com>
Subject:   Re: O_XATTR support in FreeBSD?
Message-ID:  <CAPL6_jS_j=B79k2w_cFzPpFZ304O-4mCkRhVk2SZVuKX3_eNog@mail.gmail.com>
In-Reply-To: <14246348.Ehh2xp5iLB@ralph.baldwin.cx>
References:  <BC41DB59-5868-432D-9452-00F420934E12@mail.turbofuzz.com> <CAPJSo4WvVpjUGkcOFcX19x%2BYBDp3eaf_j=UuoT7epoYmUCcWJQ@mail.gmail.com> <CAPJSo4WdzW=KnWnFq964DQZ9cSdxE4Z6mEeXrWNORc5KzAfXUA@mail.gmail.com> <14246348.Ehh2xp5iLB@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 8, 2014 at 5:52 PM, John Baldwin <jhb@freebsd.org> wrote:
> On Friday, September 05, 2014 04:24:02 PM Lionel Cons wrote:
>> On 1 December 2013 23:05, Lionel Cons <lionelcons1972@gmail.com> wrote:
>> > On 27 November 2013 05:52, Tim Kientzle <tim@kientzle.com> wrote:
>> >> On Nov 26, 2013, at 1:51 AM, Cedric Blancher <cedric.blancher@gmail.com>
> wrote:
>> >>> 5. Support for tar and pax is already there. Its described in
>> >>> Solaris's fsattr man page, they use a extended header with filename
>> >>> /dev/null (to prevent older tar versions from tripping over the new
>> >>> headers) and then have a named attribute header which describes the
>> >>> attributes names and flags.
>> >>
>> >> There are quite a few alternative approaches for storing
>> >> extended attributes in tar and pax files.
>> >
>> > 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).
>> >
>> > Lionel
>>
>> What is the status of O_XATTR (alias alternate data stream support) in
>> FreeBSD? We run more and more into the trouble that these kind of
>> streams are in use but cannot be accessed or processed on FreeBSD.
>
> I don't think anyone is even looking at it.  I didn't quite follow the
> earlier mail about this and some concrete examples probably would help.
> Can you do 'open("/path/to/foo@forkname", O_XATTR)' to open the "forkname"
> fork of the "/path/to/foo" file?

No.

You open a file (use O_NONBLOCK to prevent trouble with fifos) and use
openat(filefd, "attrname", O_XATTR, ...)

Filename "." returns you a fd to the virtual directory of the attr
resources, which you can use to fchdir() or otherwise use as normal
directory. mkdir(), mkfifo() and mknod() aren't allowed in such a
directory.
>
> --
> John Baldwin
> _______________________________________________
> 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"

Simon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPL6_jS_j=B79k2w_cFzPpFZ304O-4mCkRhVk2SZVuKX3_eNog>