mbox series

[0/3] cifs: create a common smb2pdu.h for client and server

Message ID 20210902233716.1923306-1-lsahlber@redhat.com (mailing list archive)
Headers show
Series cifs: create a common smb2pdu.h for client and server | expand

Message

Ronnie Sahlberg Sept. 2, 2021, 11:37 p.m. UTC
Steve,

Here is an initial set of patches that starts moving SMB2 PDU definitions
from the client/server into a shared smb2pd.h file.

It moves the command opcode values into cifs_common, 
it renames cifs smb2_sync_hdr to smb2_hdr to harmonize with ksmbd naming
and it moves the tree connect and disconnect PDU definitions to the shared
file.

Comments

Steve French Sept. 3, 2021, midnight UTC | #1
The smbfsctl.h should also be easy to move ... but the obvious
question is whether "common" headers belong in "fs/cifs_common" or in
include/linux ...
(as e.g. nfs does with common headers between server and client)

On Thu, Sep 2, 2021 at 6:37 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
>
> Steve,
>
> Here is an initial set of patches that starts moving SMB2 PDU definitions
> from the client/server into a shared smb2pd.h file.
>
> It moves the command opcode values into cifs_common,
> it renames cifs smb2_sync_hdr to smb2_hdr to harmonize with ksmbd naming
> and it moves the tree connect and disconnect PDU definitions to the shared
> file.
>
>
>
ronnie sahlberg Sept. 3, 2021, 3:01 a.m. UTC | #2
On Fri, Sep 3, 2021 at 12:16 PM Steve French <smfrench@gmail.com> wrote:
>
> The smbfsctl.h should also be easy to move ... but the obvious
> question is whether "common" headers belong in "fs/cifs_common" or in
> include/linux ...
> (as e.g. nfs does with common headers between server and client)

Maybe. I think things that should never be used by any other,
non-cifs, modules might be better in cifs-common than make
them world visible in include/linux.
Especially things like pdu structures that should never be used by any
other modules.

But I do not feel strongly about it  so feel free to git mv the file over there.




>
> On Thu, Sep 2, 2021 at 6:37 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
> >
> > Steve,
> >
> > Here is an initial set of patches that starts moving SMB2 PDU definitions
> > from the client/server into a shared smb2pd.h file.
> >
> > It moves the command opcode values into cifs_common,
> > it renames cifs smb2_sync_hdr to smb2_hdr to harmonize with ksmbd naming
> > and it moves the tree connect and disconnect PDU definitions to the shared
> > file.
> >
> >
> >
>
>
> --
> Thanks,
>
> Steve
Steve French Sept. 3, 2021, 4:53 p.m. UTC | #3
should be fine in cifs_common - there is precedent in two headers
already, and nfs also has an example where they do the reverse
"include ../nfs/nfs4_fs.h" in nfs_ssc.c

On Thu, Sep 2, 2021 at 10:01 PM ronnie sahlberg
<ronniesahlberg@gmail.com> wrote:
>
> On Fri, Sep 3, 2021 at 12:16 PM Steve French <smfrench@gmail.com> wrote:
> >
> > The smbfsctl.h should also be easy to move ... but the obvious
> > question is whether "common" headers belong in "fs/cifs_common" or in
> > include/linux ...
> > (as e.g. nfs does with common headers between server and client)
>
> Maybe. I think things that should never be used by any other,
> non-cifs, modules might be better in cifs-common than make
> them world visible in include/linux.
> Especially things like pdu structures that should never be used by any
> other modules.
>
> But I do not feel strongly about it  so feel free to git mv the file over there.
>
>
>
>
> >
> > On Thu, Sep 2, 2021 at 6:37 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
> > >
> > > Steve,
> > >
> > > Here is an initial set of patches that starts moving SMB2 PDU definitions
> > > from the client/server into a shared smb2pd.h file.
> > >
> > > It moves the command opcode values into cifs_common,
> > > it renames cifs smb2_sync_hdr to smb2_hdr to harmonize with ksmbd naming
> > > and it moves the tree connect and disconnect PDU definitions to the shared
> > > file.
> > >
> > >
> > >
> >
> >
> > --
> > Thanks,
> >
> > Steve