From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f196.google.com ([209.85.210.196]:40324 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726998AbeH2AhS (ORCPT ); Tue, 28 Aug 2018 20:37:18 -0400 Received: by mail-pf1-f196.google.com with SMTP id s13-v6so1221104pfi.7 for ; Tue, 28 Aug 2018 13:43:56 -0700 (PDT) MIME-Version: 1.0 References: <20180825223615.GS6515@ZenIV.linux.org.uk> <20180827170531.GC217636@jra3> <20180827182143.GB24544@bombadil.infradead.org> <20180828004523.GB2304@thunk.org> <20180828181245.GE41380@jra3> <20180828184057.GB97108@jra3> <20180828194742.GD97108@jra3> In-Reply-To: <20180828194742.GD97108@jra3> From: Steve French Date: Tue, 28 Aug 2018 15:43:45 -0500 Message-ID: Subject: Re: Streams support in Linux To: Jeremy Allison Cc: Theodore Tso , Matthew Wilcox , Al Viro , linux-fsdevel , ebiggers@kernel.org, samba-technical Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Aug 28, 2018 at 2:47 PM Jeremy Allison wrote: > > On Tue, Aug 28, 2018 at 02:43:12PM -0500, Steve French wrote: > > > > On Tue, Aug 28, 2018 at 1:12 PM Jeremy Allison wrote: > > > > > > You shouldn't need a read stream ioctl. You only need 3 I think. > > > 3). ioctl(stream_fd, FIO_DELETE_STREAM, 0); > > > > > > Delete the stream opened on stream_fd. > > > > > > Doesn't that cover everything ? > > > > This would be trickier to code than you might think. > > > > In particular I think the reaadir to list streams is going to be > > harder than the ioctl > > I had coded for it. I also had code at one point to convert streams > > to xattrs etc. > > Why is that ? You control any fd's you return, > so you can vector any readdir call into an > enum_streams request ? > > I wouldn't return streams as xattrs, as they > are separately exposed and already have meaning > in SMB1/2/3. In theory I could construct a struct fd by setting up a struct file on the fly (see "alloc_empty_file" for example) and the few dozen fields in it, but it would be a lot easier to return them as xattrs with a reserved prefix (e.g. "streams") since most of these are small (some examples) and could have been stored in xattrs if the Apple or Windows developers had wanted to "streams.ZoneIdentifier" (for Internet Explorer download security info) "streams.favicon" (for Internet explorer icons) "streams.AFP_AfpInfo" and "streams.AFP_Resource" (for two common Mac streams) "streams.XPRESS" (for compression) -- Thanks, Steve