Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2254799ybd; Mon, 24 Jun 2019 03:23:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqymlVX/p3/TR7Im62X3AR3dkrG4YWvdzMUQDDeCaFE80Ocj9Zo5imM55IRWL0FDOW+rz9qz X-Received: by 2002:a17:902:830c:: with SMTP id bd12mr70299218plb.237.1561371801860; Mon, 24 Jun 2019 03:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371801; cv=none; d=google.com; s=arc-20160816; b=CdRJ/SEb+5Q8QrAf12FFcowU/LgKnPuooF3aTl+OdjGxWuvuovYocFPyRY/2m1lu+1 HQC0M6g9WSHdDbYM8veJPaCV97x0ZkNZOJqG6xRbnRIVjeerO9ShPZ/qDXHKkdVY2/xi 5aA60SObvcI1v7zQaQ7omBQQmN2zyOa3CTtgSSo4BxuLvnWmBSrhfcBsxgugFLP4yTe/ MI6xQf/yXiYrw7IeZD6Q7fDV7v93qvE28ustAKYMl9wsRmtbAzDwFM3QZoAuhqTaa/iO RsSbCfxQVeS9i8V41Dudm+InebflICf7CF7i1fYzZ2nvO56VV0iB6DMbCbV2IX5iPHF1 JyGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XwHHJXJuBrOyaGtjYPQIBJ6aIAOyYrkcVtJ84Vs75Sw=; b=neUsB/BZL+oQBxAFCcNClE3M4UbEkkG+tsNlHdknK0RkhQisaVGSt2hBNgIEqWfYDQ wlgDxL2dvhXUQbRNJvF1N0Y73IPHWWZrrgoJKuW0UaO+BX645ELUgcEWO+SEjfLhjOm1 fd2ZPjpWCSsNzafU1Ra7/wXOwf8hPvxjjHD24YZtp2hVnXQnPPJD5yXKdKTHsnp1FVDF o7siBWxqu+r4tNzEU+3jqkvQm37TDebVHoQniElZE8Vgg14cqHdw77/a6fJbeoc6ELKC Zgq+aEy+qdVNtIzW5E0il0vaH3/+8ofJTGZcfCekf3Wfk4FJCqf+SSyBTcpSE8E01zj5 qSiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zJDeu10m; 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 b5si10920732pjo.26.2019.06.24.03.23.05; Mon, 24 Jun 2019 03:23:21 -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; dkim=pass header.i=@kernel.org header.s=default header.b=zJDeu10m; 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 S1731088AbfFXKWQ (ORCPT + 99 others); Mon, 24 Jun 2019 06:22:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731074AbfFXKWJ (ORCPT ); Mon, 24 Jun 2019 06:22:09 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5001420645; Mon, 24 Jun 2019 10:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561371728; bh=xyJEaPk2HfCS8hpn/PaP8yA5GZREaLpcCzt+2lcENIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zJDeu10mmKCzehf/OBBPnw6CCwKrtVwkQmC+fsthMo2jpENMUnlBRz3LqJYu/xeGh 4jeI3ro2w8NLcP7abqcN8BuGNBt2j1hfQjCzDz/oL8rb1jpQhy25dAOnGa7uWYaO+W JNAqVD09zF8vzopknoarpyPUhSs5fCpCCgipysbA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve French , Ronnie Sahlberg , Pavel Shilovsky Subject: [PATCH 5.1 112/121] SMB3: retry on STATUS_INSUFFICIENT_RESOURCES instead of failing write Date: Mon, 24 Jun 2019 17:57:24 +0800 Message-Id: <20190624092326.393367304@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092320.652599624@linuxfoundation.org> References: <20190624092320.652599624@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 CC: Stable Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky Signed-off-by: Greg Kroah-Hartman --- fs/cifs/smb2maperror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/cifs/smb2maperror.c +++ b/fs/cifs/smb2maperror.c @@ -457,7 +457,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"},