From: Pavel Shilovsky <piastryyy@gmail.com>
To: "Kenneth D'souza" <kdsouza@redhat.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>,
Steve French <smfrench@gmail.com>,
Ronnie Sahlberg <lsahlber@redhat.com>
Subject: Re: [PATCH] Add support for smb3 alias/fstype in mount.cifs.c
Date: Thu, 12 Dec 2019 16:25:50 -0800 [thread overview]
Message-ID: <CAKywueQD+CFBEoySuS493-JJJoMGENp_EkZayOeN8JMrrVRhLg@mail.gmail.com> (raw)
In-Reply-To: <20191113170126.23372-1-kdsouza@redhat.com>
ср, 13 нояб. 2019 г. в 09:01, Kenneth D'souza <kdsouza@redhat.com>:
>
> As we will slowly move towards smb3 filesystem,
> supporting through "mount -t smb3" is important.
>
> Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
> ---
> Makefile.am | 4 ++++
> mount.cifs.c | 8 +++++++-
> mount.cifs.rst | 12 +++++++++---
> 3 files changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 8291b99..1af2573 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -111,3 +111,7 @@ CLEANFILES += $(rst_man_pages)
> endif
>
> SUBDIRS = contrib
> +
> +install-exec-hook:
> + (cd $(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
> + (cd $(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
> diff --git a/mount.cifs.c b/mount.cifs.c
> index 6935fe1..0ed9d0a 100644
> --- a/mount.cifs.c
> +++ b/mount.cifs.c
> @@ -192,7 +192,7 @@ struct parsed_mount_info {
> };
>
> static const char *thisprogram;
> -static const char *cifs_fstype = "cifs";
> +static const char *cifs_fstype;
>
> static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info);
>
> @@ -1986,6 +1986,12 @@ int main(int argc, char **argv)
> if (thisprogram == NULL)
> thisprogram = "mount.cifs";
>
> + if(strcmp(thisprogram, "mount.cifs") == 0)
> + cifs_fstype = "cifs";
> +
> + if(strcmp(thisprogram, "mount.smb3") == 0)
> + cifs_fstype = "smb3";
> +
> /* allocate parsed_info as shared anonymous memory range */
> parsed_info = mmap((void *)0, sizeof(*parsed_info), PROT_READ | PROT_WRITE,
> MAP_ANONYMOUS | MAP_SHARED, -1, 0);
> diff --git a/mount.cifs.rst b/mount.cifs.rst
> index ee5086c..67ec629 100644
> --- a/mount.cifs.rst
> +++ b/mount.cifs.rst
> @@ -1,6 +1,6 @@
> -==========
> -mount.cifs
> -==========
> +=====================
> +mount.cifs mount.smb3
> +=====================
>
> --------------------------------------------------
> mount using the Common Internet File System (CIFS)
> @@ -23,6 +23,12 @@ protocol and is supported by most Windows servers, Azure (cloud storage),
> Macs and many other commercial servers and Network Attached Storage
> appliances as well as by the popular Open Source server Samba.
>
> +``mount.smb3`` mounts only SMB3 filesystem. It is usually invoked
> +indirectly by the mount(8) command when using the "-t smb3" option.
> +The ``smb3`` filesystem type was added in kernel-4.18 and above.
> +It works in a similar fashion as mount.cifs except it passes filesystem
> +type as smb3.
> +
> The mount.cifs utility attaches the UNC name (exported network
> resource) specified as service (using ``//server/share`` syntax, where
> "server" is the server name or IP address and "share" is the name of
> --
> 2.21.0
>
Merged, thanks.
--
Best regards,
Pavel Shilovsky
prev parent reply other threads:[~2019-12-13 0:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 17:01 [PATCH] Add support for smb3 alias/fstype in mount.cifs.c Kenneth D'souza
2019-12-13 0:25 ` Pavel Shilovsky [this message]
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=CAKywueQD+CFBEoySuS493-JJJoMGENp_EkZayOeN8JMrrVRhLg@mail.gmail.com \
--to=piastryyy@gmail.com \
--cc=kdsouza@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=lsahlber@redhat.com \
--cc=smfrench@gmail.com \
/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).