[PATCH] SMB2 AAPL create context

Ralph Böhme rb at sernet.de
Sat Nov 22 00:41:54 MST 2014


On Sat, Nov 22, 2014 at 02:39:16AM +0100, Stefan (metze) Metzmacher wrote:
> Hi Ralph.
> 
> >>>> On Fri, Oct 31, 2014 at 01:58:38PM -0700, Jeremy Allison wrote:
> >>>>> Ralph, can you re-post the AAPL create context
> >>>>> patch with your latest changes ?
> >>>>>
> >>>>> I'd love to get this reviewed and into the
> >>>>> code base now you're a Team member :-).
> >>>>
> >>>> that would be great!
> >>>>
> >>>> Patchset attached, couldn't rebase on master as sn is still down.
> >>>
> >>>> diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
> >>>> index d0015d5..5137e5e 100644
> >>>> --- a/source3/smbd/globals.h
> >>>> +++ b/source3/smbd/globals.h
> >>>> @@ -504,6 +504,9 @@ struct smbXsrv_connection {
> >>>>  			uint32_t max_trans;
> >>>>  			uint32_t max_read;
> >>>>  			uint32_t max_write;
> >>>> +			bool use_aapl_crtctx;
> >>>> +			bool smb2_crtctx_aapl_readdir_attr;
> >>>> +			bool smb2_crtctx_aapl_unix_info;
> >>>>  		} server;
> >>>>  
> >>>>  		struct smbd_smb2_request *requests;
> >>>
> >>> OK, adding these into the struct smbXsrv_connection is
> >>> *so* the wrong place to put these :-).
> >>
> >> :)
> >>
> >>>
> >>> I'm not sure what the right place is yet, but I don't
> >>> think it's there... :-).
> >>
> >> I'd highly appreciate a recommendation where to hang them off, in the
> >> meantime I'll poke around some more looking for the right place.
> > 
> > smbXsrv_connection also has smb1.unix_info.client_cap_low which is
> > used similiarily in trans2.c with a bunch of feature flags.
> > 
> > I've looked arond some more, but couldn't come up with any other place
> > to hang the AAPL flags off.
> 
> If we need to access this in vfs modules...

the patchset at hand does not do that, but the full
SMB_VFS_CREATE_FILE() in trans2.c totally kills performance in a
cluster setup, so as recommended by Volker I'm currently looking into
adding a new lightweight VFS call whose purpose will be to fetch and
return the required Mac metadata.

> ... it should be in smbd_server_connection, ...

Can you please give a short description of the difference between
smbd_server_connection and smbXsrv_connection.

> ...as mentioned before can you please write some torture tests which
> demonstrate this needs to be set for the whole transport connection.

you mean transport vs tree connect? If you insist I can add one, but
the relevant AAPL feature flag is defined as a server capability
(kAAPL_SUPPORTS_READDIR_ATTR), not as a per mount option:

<https://github.com/slowfranklin/apple-smb2/blob/master/kernel/netsmb/smb_2.h#L117>

> Does the latest Apple version support SMB3 multi-channel?

Unfortunately not.

Cheerio!
-Ralph

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de


More information about the samba-technical mailing list