From patchwork Wed Jan 23 21:10:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 10777895 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A6CA6C2 for ; Wed, 23 Jan 2019 21:11:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B1122D7AB for ; Wed, 23 Jan 2019 21:11:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F15A2D7B2; Wed, 23 Jan 2019 21:11:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 286852D7AB for ; Wed, 23 Jan 2019 21:11:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbfAWVLD (ORCPT ); Wed, 23 Jan 2019 16:11:03 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38340 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbfAWVLD (ORCPT ); Wed, 23 Jan 2019 16:11:03 -0500 Received: by mail-pl1-f196.google.com with SMTP id e5so1786109plb.5 for ; Wed, 23 Jan 2019 13:11:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=D8NwUr/m3AZjl9UkX0yIYPyphz0soiujfLHniP3Px70=; b=j7pCHIpbDD8XG3rAR/tevp6/dTl5bpERe+KJdwBuRP8nCMl5lU4YueHHTrZbPmln8f 5zExBTRyK67+KkfGxOZzov1PlusnOuRSu5zwzmay5HY1dp21bZ70MEJ8H/wuhIQa2PJs +y9oRVN3gC7Ifd6WuI2hdLfIbqNrci8qPmnKhYU3tB+NQapNUd56KDOXIhRA/r1sO48g bSDYwuCMks/oTKSCoGa2U++McRKs6YJ+pIAQ1wbvtzZWFKlfnyJ0NM72m5lErUImeFdH lCSZFBrWgN9JoXV/BIBPN/MQ1tLcY344wu+j40abcz04td/Prv9S2G4ZJLj38rx8kQ8D fcWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=D8NwUr/m3AZjl9UkX0yIYPyphz0soiujfLHniP3Px70=; b=Smm+2fXVt8esfVmCHQmKy85LETaJ68wj8aRpm9EsE61MOX+pjBMu3VcxaAi9NMGk8x DzIMTEsfoR5RuCMF+ykAFjFQUZOpgb6sRfG8RxvfBdzc8Dk6y7oiNO0bEolh2REThkjL wY5FgBuGiWa8SkGQJn3NrKLZm8KXS1Ds+YYa0m3HBg5iR1lfrZDt1rnC/AfGnK5Sk8Hx hwtlfYxSbalDMaBrHfRSktM4lJBPSQn2BXCfFTO6XjZXtsZrmoV9yQ+R+QNE9UFmiaBI c/GorSkXDk+YSHcJYs34RS+cAs/h/CsEQD3tBKU1QnflcjKQJAbEENlT0PN37u086XzU IqiQ== X-Gm-Message-State: AJcUukdBj0mygwrU03Xuh3h9Z7EIzi/0SfSzDdQaE0kFLIu6zoCKa/72 dVW0wbZ5wq+/jOhjWjQ+BxyM9fw= X-Google-Smtp-Source: ALg8bN4tKroclLYoGs7ZdZCQGQIz+RH4e3+u9v+ZppM2JFgZykrT1hXwHh9Lg58HxrWm6gqXfKpJiA== X-Received: by 2002:a17:902:b18b:: with SMTP id s11mr3870491plr.56.1548277862630; Wed, 23 Jan 2019 13:11:02 -0800 (PST) Received: from ubuntu-vm.corp.microsoft.com ([2001:4898:80e8:f:a17f:4e9f:6b7c:507d]) by smtp.gmail.com with ESMTPSA id n73sm28063714pfj.148.2019.01.23.13.11.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Jan 2019 13:11:01 -0800 (PST) From: Pavel Shilovsky X-Google-Original-From: Pavel Shilovsky To: linux-cifs@vger.kernel.org, Steve French , Ronnie Sahlberg Subject: [PATCH 08/15] CIFS: Do not consider -ENODATA as stat failure for reads Date: Wed, 23 Jan 2019 13:10:38 -0800 Message-Id: <1548277845-6746-9-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548277845-6746-1-git-send-email-pshilov@microsoft.com> References: <1548277845-6746-1-git-send-email-pshilov@microsoft.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When doing reads beyound the end of the file the server returned error STATUS_END_OF_FILE error which is mapped to -ENODATA. Currently we report it as a failure which confuses read stats. Change it to not consider -ENODATA as failure for stat purposes. Signed-off-by: Pavel Shilovsky --- fs/cifs/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 6d2901b..291f290 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -3209,7 +3209,7 @@ smb2_readv_callback(struct mid_q_entry *mid) rdata->mr = NULL; } #endif - if (rdata->result) + if (rdata->result && rdata->result != -ENODATA) cifs_stats_fail_inc(tcon, SMB2_READ_HE); queue_work(cifsiod_wq, &rdata->work);