Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21845192ybl; Mon, 6 Jan 2020 12:27:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwcdPq0WS05OgHA5FWnWM5UYNBpszsvXT7+Ct53pgQ/iBlp2HaId/3y8yRoyGn92++d4y65 X-Received: by 2002:a9d:7410:: with SMTP id n16mr105948279otk.23.1578342477452; Mon, 06 Jan 2020 12:27:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578342477; cv=none; d=google.com; s=arc-20160816; b=qinpGr4c6RpHQLzv0NtsHpY13Bkt4vXxi9aoXtytinT9ViuqWTIgT7QKvK6uCgO1rA NbQnnusSOtN/ENKiYGC5XAZj6hfqtxgvCWKQnxzgCPkDUl9jwIIr+wekHTWykHhNgJfT hil+Q25j+np1jL+oHAyzHc8Npf/IUBcrE/8HeAHe7xf6G6yo2YmLKKOeyFdj0yd3rh3f AK7wLwueqDyimeNsfKmq8kOdKC3GYyTSurwnIEMnv+wzK33JAGnXu2kxmiDLzZJgOu71 SfV9Bs3/rSHOn5MWh/ZA+MxuHepWGYoQXIU2gBxgm6K4FZhcz9zuC8qBeBS3nVC45Nqp gfVw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LCS3ND5K0LSGjGrE+PmH6QLpz2D5+xDXwsHW2kduECw=; b=r7MuIiY+Pb0H81ndoMyufDqnUu+acClU0UUl4vQCMjBQ+G2skhdvTMrhXTxPsOYe9c audidTPIiSqkd4+JkBF9qgWY4712qe6i7K3rP1428DPMuVFGsdf0+qrWpEIe38pL20M2 w12G3Fg6ZtH6fYpwDif2TeWqFGmvuELTSu+NDps4kmj8AJ+uK/YVxqH7mS4GrAnHDU9V jk7nufa9f+k/UOeZxRS35R/8PDkbr2Q2rjSEl8jiichnDQQWhziYApuZ4FKoi/tPTAEr KGg+gvtKH9M/Pk8h0DcPTubG2BYO25kndLxU2OMeQh/xi9w6L8ysK2KqfsSyBxhg9qdd 6m5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y0EZdxAk; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si28878156oie.119.2020.01.06.12.27.46; Mon, 06 Jan 2020 12:27:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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=@gmail.com header.s=20161025 header.b=Y0EZdxAk; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726767AbgAFU1p (ORCPT + 99 others); Mon, 6 Jan 2020 15:27:45 -0500 Received: from mail-yb1-f195.google.com ([209.85.219.195]:46456 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726735AbgAFU1o (ORCPT ); Mon, 6 Jan 2020 15:27:44 -0500 Received: by mail-yb1-f195.google.com with SMTP id k128so11631195ybc.13 for ; Mon, 06 Jan 2020 12:27:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LCS3ND5K0LSGjGrE+PmH6QLpz2D5+xDXwsHW2kduECw=; b=Y0EZdxAko6SewWSg+iqvf3INxGDYr/NnX5DtpVVMC04IhNwiWysiIHS43ihcDKD9Au ILTq8fXd/yiumNhyIpyzMNOu9DyS+zTIgEHfjeT6Rf6KmoCZ5bLZvK+eUsbc8hOHP9Vu IfYdQAiQVe/F5/Pg5GLyPqGahfPa1IElBUyHo6BxLfziqtOfbydf69oE/KVCNJAeNhNl 9TbTTWQazbGn1B68lzAo7R7efJJgU6amVWzcVYcr8dFodKSu7s+mAz7aJPW7pUAFuibn WVxgt5IH//iZACTr3V9UAOFK3Hi6ZdNEhbKZRQgj73mlXAMWAyKELQUxLESxyAnXaW3w CZDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LCS3ND5K0LSGjGrE+PmH6QLpz2D5+xDXwsHW2kduECw=; b=rovrrR1FIU1WBCVpzU5Op9vete1p9+4KwVrS8wMz6Vc3y55unHZh34UkUi96m+6bEX XdOee7GiR2py95/bM9BVSfTeKy5MkTh0MuMi7WLwaZeNVylQ/+U+MdaHRouTzsULDiR6 H67sLVS6qZonbp1bwjA2MbMPXaUvZmZpKqZXF54pOOm9IhMrWX048vb3nFuIFuio4jQ0 afRY1LVbEwwKo872/1lBxQvOKCz/0N2QF+3sHqbws8Q2S/8d+Xmgng82UgSzcd2PmZDH 3wGEigfumq09Jr//NYhpWWwRft+LkWaKZyaNphvQWRKSO57/3tZgiWiXeYIuwmpDVzxi o2TA== X-Gm-Message-State: APjAAAWpK5S9O4LdPEiA8Pu2Pr+VJpWcNOHIOpCA9sZAqOnXD0sQkdK3 5yoL0zH2lO3S21YRui6Mj+oIl/bPaQ== X-Received: by 2002:a5b:409:: with SMTP id m9mr25179991ybp.423.1578342463570; Mon, 06 Jan 2020 12:27:43 -0800 (PST) Received: from localhost.localdomain (c-68-40-189-247.hsd1.mi.comcast.net. [68.40.189.247]) by smtp.gmail.com with ESMTPSA id l200sm28723579ywl.106.2020.01.06.12.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 12:27:43 -0800 (PST) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH 14/15] NFS: When resending after a short write, reset the reply count to zero Date: Mon, 6 Jan 2020 15:25:13 -0500 Message-Id: <20200106202514.785483-15-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106202514.785483-14-trond.myklebust@hammerspace.com> References: <20200106202514.785483-1-trond.myklebust@hammerspace.com> <20200106202514.785483-2-trond.myklebust@hammerspace.com> <20200106202514.785483-3-trond.myklebust@hammerspace.com> <20200106202514.785483-4-trond.myklebust@hammerspace.com> <20200106202514.785483-5-trond.myklebust@hammerspace.com> <20200106202514.785483-6-trond.myklebust@hammerspace.com> <20200106202514.785483-7-trond.myklebust@hammerspace.com> <20200106202514.785483-8-trond.myklebust@hammerspace.com> <20200106202514.785483-9-trond.myklebust@hammerspace.com> <20200106202514.785483-10-trond.myklebust@hammerspace.com> <20200106202514.785483-11-trond.myklebust@hammerspace.com> <20200106202514.785483-12-trond.myklebust@hammerspace.com> <20200106202514.785483-13-trond.myklebust@hammerspace.com> <20200106202514.785483-14-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org If we're resending a write due to a short read or write, ensure we reset the reply count to zero. Signed-off-by: Trond Myklebust --- fs/nfs/read.c | 2 ++ fs/nfs/write.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 12deb3bdb2a0..34bb9add2302 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -281,6 +281,8 @@ static void nfs_readpage_retry(struct rpc_task *task, argp->offset += resp->count; argp->pgbase += resp->count; argp->count -= resp->count; + resp->count = 0; + resp->eof = 0; rpc_restart_call_prepare(task); } diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 985ddff46051..2c2020546e24 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1656,6 +1656,8 @@ static void nfs_writeback_result(struct rpc_task *task, */ argp->stable = NFS_FILE_SYNC; } + resp->count = 0; + resp->verf->committed = 0; rpc_restart_call_prepare(task); } } -- 2.24.1