diff mbox series

smb3: do not display confusing message on mount to Azure servers

Message ID CAH2r5msUDNJgeYrNDKTp4H0D=9jBm7fOHew+PTA9JeFO5k14oA@mail.gmail.com (mailing list archive)
State New, archived
Headers show
Series smb3: do not display confusing message on mount to Azure servers | expand

Commit Message

Steve French Sept. 13, 2018, 8:16 p.m. UTC
Some servers (e.g. Azure) return "STATUS_NOT_IMPLEMENTED" rather
than "STATUS_INVALID_DEVICE_REQUEST" on query network interface
info at mount.  This shouldn't cause us to log a warning message
automatically but does because we were not checking for ENOSYS.
According to checkpatch we shouldn't be using ENOSYS for this
in any case so fix it by mappoing to EOPNOTSUPP so we
don't log this unless noisier cifsFYI is enabled.

Signed-off-by: Steve French <stfrench@microsoft.com>

 fs/cifs/smb2maperror.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

     {STATUS_ACCESS_VIOLATION, -EACCES, "STATUS_ACCESS_VIOLATION"},

Comments

ronnie sahlberg Sept. 13, 2018, 9:04 p.m. UTC | #1
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>

On Fri, Sep 14, 2018 at 6:16 AM, Steve French <smfrench@gmail.com> wrote:
> Some servers (e.g. Azure) return "STATUS_NOT_IMPLEMENTED" rather
> than "STATUS_INVALID_DEVICE_REQUEST" on query network interface
> info at mount.  This shouldn't cause us to log a warning message
> automatically but does because we were not checking for ENOSYS.
> According to checkpatch we shouldn't be using ENOSYS for this
> in any case so fix it by mappoing to EOPNOTSUPP so we
> don't log this unless noisier cifsFYI is enabled.
>
> Signed-off-by: Steve French <stfrench@microsoft.com>
>
>  fs/cifs/smb2maperror.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c
> index 20a2d304c603..d47b7f5dfa6c 100644
> --- a/fs/cifs/smb2maperror.c
> +++ b/fs/cifs/smb2maperror.c
> @@ -288,7 +288,7 @@ static const struct status_to_posix_error
> smb2_error_map_table[] = {
>      {STATUS_FLT_BUFFER_TOO_SMALL, -ENOBUFS, "STATUS_FLT_BUFFER_TOO_SMALL"},
>      {STATUS_FVE_PARTIAL_METADATA, -EIO, "STATUS_FVE_PARTIAL_METADATA"},
>      {STATUS_UNSUCCESSFUL, -EIO, "STATUS_UNSUCCESSFUL"},
> -    {STATUS_NOT_IMPLEMENTED, -ENOSYS, "STATUS_NOT_IMPLEMENTED"},
> +    {STATUS_NOT_IMPLEMENTED, -EOPNOTSUPP, "STATUS_NOT_IMPLEMENTED"},
>      {STATUS_INVALID_INFO_CLASS, -EIO, "STATUS_INVALID_INFO_CLASS"},
>      {STATUS_INFO_LENGTH_MISMATCH, -EIO, "STATUS_INFO_LENGTH_MISMATCH"},
>      {STATUS_ACCESS_VIOLATION, -EACCES, "STATUS_ACCESS_VIOLATION"},
>
> --
> Thanks,
>
> Steve
diff mbox series

Patch

From 9c382451081aa0e4f5a146cebe6696b019bb962b Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Thu, 13 Sep 2018 15:12:34 -0500
Subject: [PATCH] smb3: do not display confusing message on mount to Azure
 servers

Some servers (e.g. Azure) return "STATUS_NOT_IMPLEMENTED" rather
than "STATUS_INVALID_DEVICE_REQUEST" on query network interface
info at mount.  This shouldn't cause us to log a warning message
automatically.  Don't log this unless noisier cifsFYI is enabled.

Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/smb2maperror.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c
index 20a2d304c603..d47b7f5dfa6c 100644
--- a/fs/cifs/smb2maperror.c
+++ b/fs/cifs/smb2maperror.c
@@ -288,7 +288,7 @@  static const struct status_to_posix_error smb2_error_map_table[] = {
 	{STATUS_FLT_BUFFER_TOO_SMALL, -ENOBUFS, "STATUS_FLT_BUFFER_TOO_SMALL"},
 	{STATUS_FVE_PARTIAL_METADATA, -EIO, "STATUS_FVE_PARTIAL_METADATA"},
 	{STATUS_UNSUCCESSFUL, -EIO, "STATUS_UNSUCCESSFUL"},
-	{STATUS_NOT_IMPLEMENTED, -ENOSYS, "STATUS_NOT_IMPLEMENTED"},
+	{STATUS_NOT_IMPLEMENTED, -EOPNOTSUPP, "STATUS_NOT_IMPLEMENTED"},
 	{STATUS_INVALID_INFO_CLASS, -EIO, "STATUS_INVALID_INFO_CLASS"},
 	{STATUS_INFO_LENGTH_MISMATCH, -EIO, "STATUS_INFO_LENGTH_MISMATCH"},
 	{STATUS_ACCESS_VIOLATION, -EACCES, "STATUS_ACCESS_VIOLATION"},
-- 
2.17.1