Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1190580ybn; Wed, 2 Oct 2019 12:11:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMzmC76JcfX//S8Kkf+gU17AK6SL2TUedqrSa/eLuBwOaATvboyt01FxlpVGtAH3PjrNaF X-Received: by 2002:a50:f009:: with SMTP id r9mr5662560edl.195.1570043495163; Wed, 02 Oct 2019 12:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570043495; cv=none; d=google.com; s=arc-20160816; b=txHBMnq+m1p15V14Ez30KdNFWv7m0CdoMbGigPLsFtHQEibn4hy7hA5oXfb6icPjLr 81TWoOxULjz2eV7xeOcxTrqq+CLQyzCbWQCZjr+I6zk30EFEwNSn94J875eMjGst/54p +EA6OcgYYK1aWl82ZCDpEUNs/8FvUZYlJZg95O1HKRbRg6ZDCBcPeTgxjMpkkEPyICT+ rBInoWv6zYPpNit3r23ggywlcRjUct4oZZMs0FDbyIC3sPYY0vkq/sDDZ9kI9IQMLIJs cwjs5u2q778jm9M9092GV7VUmiEFCey8iXsxp565tLFjzxnYXnRtRqL+oJ3lYdv9KKtW ehkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=gfGwXSLPTs/WFnEIwregPzfMbq1J6/INARGD4qbr+xY=; b=l7q4sI/EhTNg040BqhuSg/k0UQsE2MHzi9HAyCBaZkRHX4SI5tYePFLWqagFC/EBER hZd65NIZ+YOtr6E6dMz7Srfg6gCYeEOZqPOnHGdNXRLb9fQFLCgSqyad3qjAtVMxNVPF QEDqbXXjDq6kXhe1S01Ua5UjrFe4/9AoFOHFiviSvHQNhGCnmnBGHhjEiO8HV6lFN+G6 yu2FgLDBhIvmCBiIxEVmO9YY5TKK89Ky1hNk8+Zrg2meqfUJW759wxHFTz6NIHpLJoqx bM9sPplr0mVF5ZfoFgzVaJ8oDUIR6CjF2fWm+aO+1HaUeLw9Q/P/3uufXynCqy6Ojg5P aHew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e21si27066edb.164.2019.10.02.12.11.10; Wed, 02 Oct 2019 12:11:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729786AbfJBTKM (ORCPT + 99 others); Wed, 2 Oct 2019 15:10:12 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35966 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729342AbfJBTIS (ORCPT ); Wed, 2 Oct 2019 15:08:18 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iFjyx-000366-Re; Wed, 02 Oct 2019 20:08:16 +0100 Received: from ben by deadeye with local (Exim 4.92.1) (envelope-from ) id 1iFjyp-0003fF-GS; Wed, 02 Oct 2019 20:08:07 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Ronnie Sahlberg" , "Pavel Shilovsky" , "Steve French" Date: Wed, 02 Oct 2019 20:06:51 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 67/87] SMB3: retry on STATUS_INSUFFICIENT_RESOURCES instead of failing write In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.75-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Steve French commit 8d526d62db907e786fd88948c75d1833d82bd80e upstream. Some servers such as Windows 10 will return STATUS_INSUFFICIENT_RESOURCES as the number of simultaneous SMB3 requests grows (even though the client has sufficient credits). Return EAGAIN on STATUS_INSUFFICIENT_RESOURCES so that we can retry writes which fail with this status code. This (for example) fixes large file copies to Windows 10 on fast networks. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky Signed-off-by: Ben Hutchings --- fs/cifs/smb2maperror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/cifs/smb2maperror.c +++ b/fs/cifs/smb2maperror.c @@ -455,7 +455,7 @@ static const struct status_to_posix_erro {STATUS_FILE_INVALID, -EIO, "STATUS_FILE_INVALID"}, {STATUS_ALLOTTED_SPACE_EXCEEDED, -EIO, "STATUS_ALLOTTED_SPACE_EXCEEDED"}, - {STATUS_INSUFFICIENT_RESOURCES, -EREMOTEIO, + {STATUS_INSUFFICIENT_RESOURCES, -EAGAIN, "STATUS_INSUFFICIENT_RESOURCES"}, {STATUS_DFS_EXIT_PATH_FOUND, -EIO, "STATUS_DFS_EXIT_PATH_FOUND"}, {STATUS_DEVICE_DATA_ERROR, -EIO, "STATUS_DEVICE_DATA_ERROR"},