From patchwork Tue Apr 20 04:27:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 1468168 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-cifs-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=LinfN0ex; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4FPVzG1kVjz9vDx for ; Tue, 20 Apr 2021 14:27:54 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbhDTE2X (ORCPT ); Tue, 20 Apr 2021 00:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbhDTE2W (ORCPT ); Tue, 20 Apr 2021 00:28:22 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4D81C06174A for ; Mon, 19 Apr 2021 21:27:51 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id o5so8884850ljc.1 for ; Mon, 19 Apr 2021 21:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=M9aAz716m1bO6LdaILBzz+qpcW/u4AmcNxzXXDB+JDA=; b=LinfN0exYV/AHHWgWaYt6dwHO1RRiWaQSdiEhnyoZYhihgCSP4NAndW01W9dBe0Gw7 QuD76k039rX9anTA11K7v7AZqNuHYeQGFIgkza5ytCoqB7hok6KRB2aCUWp2AybPER23 B4dp+aozk4Qw1uDMWD3yzb9W7Fhddv3GmJ+yO7r8/skUVF833At1xCXituuqE5evkXR6 OENqRpf5z9idRqoJ2bCJk1lPRy21aVPRmVax4zlS9wSVUxuGeu2KQ/M/200vL5Wxdcbq TL8yAZhc27I7sMxMMBcvxRgS7GHFLGHw5CStLSEUpDXCdlqPj/1jL4svwB/h1Le6PYF+ Beyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=M9aAz716m1bO6LdaILBzz+qpcW/u4AmcNxzXXDB+JDA=; b=fhOo8pPhMulUAqWxcPIP9RQY//vmPLPhHOpwjzN2qxeflWxxiVVoW5YgDj2jMprzYc 6lj8xKhouUH6zOfgVFam13wqjTKzQXZ49S6c6UkmHHGt+9oIMLTwvMy+24+EVOPqDHKy a0DOMX7J9UC8Jtgba6QWnle/ayPzod9E6hCiaJfh257DJUzwQVplPM704DZS8+xS3dut BqehSLwBThNnfsTJHXXVeQ6G/akBGYDh4Nf2stW7OLXNwj0pmD2/yD+LAkxOYyTlWrx6 het35IygBmd6FSIKj5CZht0o2AcE+fh9ruGXhRHEEPTkyu9vc65Px39InQDhEMZyJbre AoPQ== X-Gm-Message-State: AOAM5328EMNO/4H765fzKcfWhA2DKzCxAHpRu993NEcop+JH79s98Hxh +w9KwYigSVNxuaZq9gJN+zA+tw8GS8a1NuBmlCa3zTvQiMg= X-Google-Smtp-Source: ABdhPJwsWKqmawEZ7b4ItGz+Q1bea5hY8sTSg7jGr2QMk3ZUhEjqvY/eAWTax5J/rNtWZZ5zW1omb6PfvvxjJ3gyCxk= X-Received: by 2002:a05:651c:339:: with SMTP id b25mr13258981ljp.406.1618892870072; Mon, 19 Apr 2021 21:27:50 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Mon, 19 Apr 2021 23:27:39 -0500 Message-ID: Subject: [PATCH][SMB3] limit noisy error To: CIFS Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org 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" Signed-off-by: Steve French --- fs/cifs/smb2ops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) }_exit; + } else if (rc) { cifs_tcon_dbg(VFS, "refcpy ioctl error %d getting resume key\n", rc); goto req_res_key_exit; } From 0e8868212d1ca2f639171feb93f7b2b270ec9aba Mon Sep 17 00:00:00 2001 From: Steve French Date: Mon, 19 Apr 2021 23:22:37 -0500 Subject: [PATCH] smb3: limit noisy error 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" Signed-off-by: Steve French --- 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; } -- 2.27.0