All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Allison <jra@samba.org>
To: ronnie sahlberg <ronniesahlberg@gmail.com>,
	Christoph Hellwig <hch@lst.de>
Cc: "Björn JACKE" <bj@sernet.de>, "Steve French" <smfrench@gmail.com>,
	CIFS <linux-cifs@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>
Subject: Re: Displaying streams as xattrs
Date: Thu, 25 May 2023 09:22:16 -0700	[thread overview]
Message-ID: <ZG+LOKTr8B+zjQsC@jeremy-rocky-laptop> (raw)
In-Reply-To: <CAN05THTi0BC_iwjXMiWn61fg3hRemi5Momwp3O0WGygyWLGomQ@mail.gmail.com>

On Thu, May 25, 2023 at 08:49:47PM +1000, ronnie sahlberg wrote:
>>
>> just took a look at how the ntfs-3g module is handling this. It was an option
>> streams_interface=value, which allows "windows", which means that the
>> alternative data streams are accessable as-is like in Windows, with ":" being
>> the separator. This might be a nice option for cifsfs also. That option would
>> just be usable if no posix extensions are enabled of course.
>
>We could. But that is a windowism where ':' is a reserved character
>but which is not a reserved character in unixens.
>For example:
>You have the file "foo" with stream "bar" and you have another normal
>file "foo:bar"
>Which one does open("foo:bar") give you?
>
>The openat/... semantics that solaris uses provides an elegant and
>unambiguous semantics for it.
>You want to open stream bar on file foo?
>1, fh = open("foo")
>2, sh = openatf(h, "bar")
>
>There are at least two non-windows related filesystems that support
>something similar to ADS,
>solaris filesystem and apples filesystem(s) so it would be nice to
>have a neutral API where an application can use the same
>code to access streams be they cifs/ntfs/solarisfs/applefs/...other...
>
>Steve, I think this would be a good discussion topic for vfs meetings.
>Is it desirable to bless an api in the vfs to do alternate data
>streams?
>There are at least 4 filesystems that provide this feature, 3 of which
>are still very popular and common today.
>
>One approach would be to mimic the interface that solaris provides
>with openatfile-fd, "stream-name")

Solaris is dead, dead, dead. We should not resurrect the
warts of that thing in Linux.

>But that would not just be a filesystem change but also a VFS change
>since it would suddenly accept passing a file-fd as argument
>as a valid option (for those filesystems that have signalled
>alternative stream support?)
>while the vfs currently only allows openat() on a directory-fd.

I never thought I'd be calling on Christolph Hellwig
to squash such a horror before it emerges, but I'm
  CC:ing him on this email in the hope that he will :-).

>ADS as a concept is really powerful and could be enormously useful as
>way to attach metadata to a file object in a standardized way.
>There are very many use-cases where having a file that embedded both
>the executable as well as various other types of data but still be
>able to treat it as a single self-contained file from an end-user
>perspective.

Please give real examples of something for which this
is *essential*. Not "could be.. useful".

Hard mode. Windows has yet to find such an example :-).

One more datapoint: "still be able to treat it as a single self-contained
file from an end-user perspective." - please enumerate
every single tool and archiving program that will need
to be changed to treat a file containing alternate data
streams as "a single self-contained file".

>This should be discussed and we should probe the vfs folks about what
>they think about it.

I hope they just say no :-).

  reply	other threads:[~2023-05-25 16:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22  2:08 Displaying streams as xattrs Steve French
2023-05-22  4:33 ` ronnie sahlberg
2023-05-22  6:39   ` Steve French
2023-05-22 14:41     ` ronnie sahlberg
2023-05-22 16:21     ` Jeremy Allison
2023-05-23  0:59       ` ronnie sahlberg
2023-05-23  2:23         ` Andrew Walker
2023-05-23 16:25         ` Jeremy Allison
2023-05-23 21:44           ` ronnie sahlberg
2023-05-23 22:34             ` Jeremy Allison
2023-05-25 10:57               ` ronnie sahlberg
2023-05-25 16:15                 ` Jeremy Allison
2023-05-26  2:39                   ` ronnie sahlberg
2023-05-26 16:20                     ` Jeremy Allison
2023-05-25  9:39       ` Björn JACKE
2023-05-25 10:49         ` ronnie sahlberg
2023-05-25 16:22           ` Jeremy Allison [this message]
2023-05-25 20:11             ` Steve French
2023-05-25 20:22               ` Jeremy Allison
2023-05-25 22:14                 ` Björn JACKE
2023-05-25 23:50                   ` Steve French
2023-05-26  2:16                     ` ronnie sahlberg
2023-05-26 16:03                     ` Björn JACKE
     [not found]                       ` <CAH2r5muD89QUcaqWNQy5NUwyji9CinN_5kGcfFSQAbpJP5gn+A@mail.gmail.com>
2023-05-27  1:50                         ` Steve French
2023-05-30  7:26                       ` Michael Weiser
2023-05-22 15:36 ` Andrew Walker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZG+LOKTr8B+zjQsC@jeremy-rocky-laptop \
    --to=jra@samba.org \
    --cc=bj@sernet.de \
    --cc=hch@lst.de \
    --cc=linux-cifs@vger.kernel.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.