From: Tom Talpey <tom@talpey.com>
To: Steve French <smfrench@gmail.com>, CIFS <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH][SMB3] limit noisy error
Date: Tue, 20 Apr 2021 14:38:25 -0400 [thread overview]
Message-ID: <bbdfbbaf-c196-bcdb-cc8f-5effb6d4d0b6@talpey.com> (raw)
In-Reply-To: <CAH2r5msPnCHf2qHtJ=tJymfa9cgyOgnrv9xPEiYF=nsWTg1syg@mail.gmail.com>
On 4/20/2021 12:27 AM, Steve French wrote:
> For servers which don't support copy_range (SMB3 CopyChunk), the
> logging of:
> CIFS: VFS: \\server\share refcpy ioctl error -95 getting resume key
> can fill the client logs and make debugging real problems more
> difficult. Change the -EOPNOTSUPP on copy_range to a "warn once"
Making this a warn_once will suppress the future message for all
tcon's, won't it? Is it possible to use a bit in the tcon to track
this instead? That might be a closer match to the scope of the
message.
Tom.
> Signed-off-by: Steve French <stfrench@microsoft.com>
> ---
> fs/cifs/smb2ops.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 5ccc36d98dad..dd0eb665b680 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1567,7 +1567,10 @@ SMB2_request_res_key(const unsigned int xid,
> struct cifs_tcon *tcon,
> NULL, 0 /* no input */, CIFSMaxBufSize,
> (char **)&res_key, &ret_data_len);
>
> - if (rc) {
> + if (rc == -EOPNOTSUPP) {
> + pr_warn_once("Server share %s does not support copy range\n", tcon->treeName);
> + goto req_res_keyFor servers which don't support copy_range (SMB3
> CopyChunk), the
> logging of:
> CIFS: VFS: \\server\share refcpy ioctl error -95 getting resume key
> can fill the client logs and make debugging real problems more
> difficult. Change the -EOPNOTSUPP on copy_range to a "warn once"
>
> Signed-off-by: Steve French <stfrench@microsoft.com>
> ---
> fs/cifs/smb2ops.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 5ccc36d98dad..dd0eb665b680 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1567,7 +1567,10 @@ SMB2_request_res_key(const unsigned int xid,
> struct cifs_tcon *tcon,
> NULL, 0 /* no input */, CIFSMaxBufSize,
> (char **)&res_key, &ret_data_len);
>
> - if (rc) {
> + if (rc == -EOPNOTSUPP) {
> + pr_warn_once("Server share %s does not support copy range\n", tcon->treeName);
> + goto req_res_key_exit;
> + } else if (rc) {
> cifs_tcon_dbg(VFS, "refcpy ioctl error %d getting resume key\n", rc);
> goto req_res_key_exit;
> }_exit;
> + } else if (rc) {
> cifs_tcon_dbg(VFS, "refcpy ioctl error %d getting resume key\n", rc);
> goto req_res_key_exit;
> }
>
prev parent reply other threads:[~2021-04-20 18:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 4:27 [PATCH][SMB3] limit noisy error Steve French
2021-04-20 18:38 ` Tom Talpey [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=bbdfbbaf-c196-bcdb-cc8f-5effb6d4d0b6@talpey.com \
--to=tom@talpey.com \
--cc=linux-cifs@vger.kernel.org \
--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