From: Steve French <smfrench@gmail.com>
To: Aurelien Aptel <aaptel@suse.com>
Cc: CIFS <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH 1/3] cifs: rename posix create rsp
Date: Sun, 9 Feb 2020 19:00:20 -0600 [thread overview]
Message-ID: <CAH2r5mvSBraHGj=ZcjK3QqUbdya67uYs8vScyh_Bh5dKKmzfYg@mail.gmail.com> (raw)
In-Reply-To: <20200208145058.10429-1-aaptel@suse.com>
tentatively merged into cifs-2.6.git for-next pending more testing
On Sat, Feb 8, 2020 at 8:51 AM Aurelien Aptel <aaptel@suse.com> wrote:
>
> little progress on the posix create response.
>
> * rename struct to create_posix_rsp to match with the request
> create_posix context
> * make struct packed
> * pass smb info struct for parse_posix_ctxt to fill
> * use smb info struct as param
> * update TODO
>
> What needs to be done:
>
> SMB2_open() has an optional smb info out argument that it will fill.
> Callers making use of this are:
>
> - smb3_query_mf_symlink (need to investigate)
> - smb2_open_file
>
> Callers of smb2_open_file (via server->ops->open) are passing an
> smbinfo struct but that struct cannot hold POSIX information. All the
> call stack needs to be changed for a different info type. Maybe pass
> SMB generic struct like cifs_fattr instead.
>
> Signed-off-by: Aurelien Aptel <aaptel@suse.com>
> ---
> fs/cifs/smb2pdu.c | 13 +++++++++----
> fs/cifs/smb2pdu.h | 9 ++++++---
> 2 files changed, 15 insertions(+), 7 deletions(-)
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index 1234f9ccab03..7d4d7cdb2eb4 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -1940,13 +1940,18 @@ parse_query_id_ctxt(struct create_context *cc, struct smb2_file_all_info *buf)
> }
>
> static void
> -parse_posix_ctxt(struct create_context *cc, struct smb_posix_info *pposix_inf)
> +parse_posix_ctxt(struct create_context *cc, struct smb2_file_all_info *info)
> {
> - /* struct smb_posix_info *ppinf = (struct smb_posix_info *)cc; */
> + /* struct create_posix_rsp *posix = (struct create_posix_rsp *)cc; */
>
> - /* TODO: Need to add parsing for the context and return */
> + /*
> + * TODO: Need to add parsing for the context and return. Can
> + * smb2_file_all_info hold POSIX data? Need to change the
> + * passed type from SMB2_open.
> + */
> printk_once(KERN_WARNING
> "SMB3 3.11 POSIX response context not completed yet\n");
> +
> }
>
> void
> @@ -1984,7 +1989,7 @@ smb2_parse_contexts(struct TCP_Server_Info *server,
> parse_query_id_ctxt(cc, buf);
> else if ((le16_to_cpu(cc->NameLength) == 16)) {
> if (memcmp(name, smb3_create_tag_posix, 16) == 0)
> - parse_posix_ctxt(cc, NULL);
> + parse_posix_ctxt(cc, buf);
> }
> /* else {
> cifs_dbg(FYI, "Context not matched with len %d\n",
> diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
> index fa03df130f1a..c84405ed603c 100644
> --- a/fs/cifs/smb2pdu.h
> +++ b/fs/cifs/smb2pdu.h
> @@ -1604,11 +1604,14 @@ struct smb2_file_id_information {
> extern char smb2_padding[7];
>
> /* equivalent of the contents of SMB3.1.1 POSIX open context response */
> -struct smb_posix_info {
> +struct create_posix_rsp {
> __le32 nlink;
> __le32 reparse_tag;
> __le32 mode;
> - kuid_t uid;
> - kuid_t gid;
> + /*
> + var sized owner SID
> + var sized group SID
> + */
> +} __packed;
> };
> #endif /* _SMB2PDU_H */
> --
> 2.16.4
>
--
Thanks,
Steve
next prev parent reply other threads:[~2020-02-10 1:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-08 14:50 [PATCH 1/3] cifs: rename posix create rsp Aurelien Aptel
2020-02-08 14:50 ` [PATCH 2/3] cifs: add smb2 POSIX info level Aurelien Aptel
2020-02-08 14:50 ` [PATCH 3/3] cifs: plumb smb2 POSIX dir enumeration Aurelien Aptel
2020-02-10 1:00 ` Steve French [this message]
2020-02-10 1:11 ` [PATCH 1/3] cifs: rename posix create rsp Steve French
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='CAH2r5mvSBraHGj=ZcjK3QqUbdya67uYs8vScyh_Bh5dKKmzfYg@mail.gmail.com' \
--to=smfrench@gmail.com \
--cc=aaptel@suse.com \
--cc=linux-cifs@vger.kernel.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).