linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: Jeremy Allison <jra@samba.org>
Cc: Tom Talpey <ttalpey@microsoft.com>,
	Steve French <smfrench@gmail.com>, Theodore Tso <tytso@mit.edu>,
	Matthew Wilcox <willy@infradead.org>,
	"ebiggers@kernel.org" <ebiggers@kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Streams support in Linux
Date: Wed, 29 Aug 2018 12:52:47 -0600	[thread overview]
Message-ID: <B4347D04-AA86-416C-A0E1-0D3D7C494C90@dilger.ca> (raw)
In-Reply-To: <20180829155922.GA114671@jra3>

[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]

On Aug 29, 2018, at 9:59 AM, Jeremy Allison <jra@samba.org> wrote:
> 
> On Wed, Aug 29, 2018 at 01:46:30PM +0000, Tom Talpey wrote:
>>> 
>>> This sounds like a case for a couple of ioctls. One to enumerate
>>> the streams on an open fd, one to open a given stream name on an
>>> open fd.
>> 
>> Wait, you're saying that Macs and Windows clients need to start issuing these new magical ioctl's to Samba/Linux servers? Not a solution, IMO.
> 
> Nope, that's not an option obviously. The ioctls only exist
> on the Linux userspace client side. Inside cifsfs they get
> converted to standard SMB1/2/3 calls.
> 
> I'm trying to create a way for Linux userspace to get
> access to these Windows/Mac/Samba features without having
> to completely change the VFS model to introduce the
> horrible Solaris semantics of opening a file as a
> directory to get access to internal streams.

Note that ext4 recently added support for xattrs larger than the
previous one-block (usually 4KB) total size.  The large xattrs were
implemented as a separate inode attached to the file/directory to
reference the multiple data blocks allocated to the xattr, which
simplifies e2fsck and ext4 block allocation/freeing/traversal.

There is no real limit on the size of such xattr inodes, except as
currently imposed by the xattr userspace APIs.  If there was an API
(e.g. openat() or an ioctl() to start) that allowed opening the
named xattrs, normal read/write should be useable to modify them.

I don't think I'd go as far as Matthew to allow link, rename, etc.
of these attributes, as that introduces unnecessary complexity for
no clear use case or benefit.  That doesn't preclude future usage
in this manner, but I don't think it makes sense to add that until
there is a clear use for this.

For the original FS Verity case, using xattrs attached to the inode
is IMHO far preferable to using a separate hidden directory and/or
special file to store the verity information, as it will properly
follow the lifetime of the original file.  Rename will keep the
verity data, and unlink will delete the verity data, without the
need for fsck to keep them consistent or do garbage collection.

Cheers, Andreas






[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]

  reply	other threads:[~2018-08-29 22:51 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-25 13:51 Streams support in Linux Matthew Wilcox
2018-08-25 14:47 ` Al Viro
2018-08-25 15:51   ` Matthew Wilcox
2018-08-25 18:00     ` Al Viro
2018-08-25 20:57       ` Matthew Wilcox
2018-08-25 22:36         ` Al Viro
2018-08-26  1:03           ` Steve French
2018-08-27 17:05             ` Jeremy Allison
2018-08-27 17:41               ` Jeremy Allison
2018-08-27 18:21               ` Matthew Wilcox
2018-08-27 18:45                 ` Al Viro
2018-08-27 19:06                 ` Jeremy Allison
2018-08-28  0:45                 ` Theodore Y. Ts'o
2018-08-28  1:07                   ` Steve French
2018-08-28 18:12                     ` Jeremy Allison
2018-08-28 18:32                       ` Steve French
2018-08-28 18:40                         ` Jeremy Allison
2018-08-28 19:43                           ` Steve French
2018-08-28 19:47                             ` Jeremy Allison
2018-08-28 20:43                               ` Steve French
2018-08-28 20:47                                 ` Jeremy Allison
2018-08-28 20:51                                   ` Steve French
2018-08-28 21:19                                   ` Stefan Metzmacher
2018-08-28 21:22                                     ` Jeremy Allison
2018-08-28 21:23                                     ` Steve French
2018-08-29  5:13                                       ` Ralph Böhme
2018-08-29 13:46                       ` Tom Talpey
2018-08-29 13:54                         ` Aurélien Aptel
2018-08-29 15:02                           ` Tom Talpey
2018-08-29 16:00                             ` Jeremy Allison
2018-08-29 15:59                         ` Jeremy Allison
2018-08-29 18:52                           ` Andreas Dilger [this message]
2018-08-26 20:30           ` Matthew Wilcox
2018-08-25 16:25 ` Theodore Y. Ts'o
2018-08-27 16:33   ` Jeremy Allison
2018-09-20  2:06 Shahbaz Youssefi

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=B4347D04-AA86-416C-A0E1-0D3D7C494C90@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=ebiggers@kernel.org \
    --cc=jra@samba.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=smfrench@gmail.com \
    --cc=ttalpey@microsoft.com \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).