Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21762519ybl; Mon, 6 Jan 2020 10:43:06 -0800 (PST) X-Google-Smtp-Source: APXvYqyuCG4yF2kuwX8jT29tbAHMaPsCTOe+pjiMxRdLTRnpjjO5Go2vgQTLJ/ycT3NV00CvLVVd X-Received: by 2002:a9d:6f82:: with SMTP id h2mr117108616otq.69.1578336185916; Mon, 06 Jan 2020 10:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578336185; cv=none; d=google.com; s=arc-20160816; b=FvClTFuF/Y21ZEYvMso9RTcSqHH11tG2lj811AuGn3FqCCgoxWGh3UT0mOP+iy83yM tJhWOhTh79XbNAvDiquFeMCzrjiI1FIDQjqJO3ElSDkPjcYuh6jommtYSX2lCr8wU5GV UqgCJM5/mKVkxpqQvPddX0KgUEg/w083HwobCVLm1k78Uznao2EgHKBfGHUV1jdUOQr3 4FanD/9qETzjXD6+pHfJ54FQbva1134hkOeCy/D8keYlxCHUqsvMGNfY5dHMhaoDJfVX aRWRRmwOWGLxSnkuhsLziW71HaVWEh6aYf6fM883v0zbczKitNFOzVh1RzYTtTNfemI9 q/fQ== 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=5vonulXfr3czMCCV7WctXC4mLeKKqa+GGJ+EMXttiSE=; b=UwDviRNaQS/CiBNAO9Nnf0iwW7gWJ7zrOYr6prRXkrgBzNbKcJ1ljTL38YcEC81ZmU v80GcYEyHBhsA2aadVjz+01sM4x2vwcwBMfU3+sfcvqOaKgqy61Axps0q4fa8uYfR4sD wM/vrBWGhaP6+vAAYj7aTKh48ORCv0/GSMdYlsexPBmiG72PQ6sinoM74FKi/KDiZ6+R p40hTyny4tPlMaVf4Cv5wHumjmztewvthZbObFAIzQgmfskQ2Kd+V1GeFhxpPl6pwnAy 3UiixuPHzb8DauaUh3VwrarKwR89lN/ARqdsrmyOkmvw35R/fKPd4aAP+GPTijFVmFh0 mV1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=icoQlB+x; 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 w202si25186890oiw.194.2020.01.06.10.42.53; Mon, 06 Jan 2020 10:43:05 -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=icoQlB+x; 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 S1726725AbgAFSmw (ORCPT + 99 others); Mon, 6 Jan 2020 13:42:52 -0500 Received: from mail-yb1-f194.google.com ([209.85.219.194]:40317 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726612AbgAFSmv (ORCPT ); Mon, 6 Jan 2020 13:42:51 -0500 Received: by mail-yb1-f194.google.com with SMTP id a2so22482964ybr.7 for ; Mon, 06 Jan 2020 10:42:51 -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=5vonulXfr3czMCCV7WctXC4mLeKKqa+GGJ+EMXttiSE=; b=icoQlB+xq2Jia8PjloAxYIjpwSyg2TlssjHG/Z4lIBoV8qGxNEFD+yUu0XaCcfJF5S clwuZl8BSxo6FHvGfZ6vi1+WZe/1g/CNXWVOZQZBn5x/psA5rJkWBgBNHkhrvk2SKtSr awOYbSFrL3B2sORxEc0pvN8Xd1buycUBUpBS0NVwPWpVG3C60gnKyPLtP35B9MKsHZYy bBLfrW+WfdhKWVB129uWapnoEpyxV84JodgAZYPOcYELNMZAKWGsT/LXUTw2S90XkQyd 13PZTY2Nem4/wzU4cVHCyKOw/QO9gBnFqHsgdKk0uDFJ6uH4G0We1jeJ58t0/7RifOZ7 gOvg== 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=5vonulXfr3czMCCV7WctXC4mLeKKqa+GGJ+EMXttiSE=; b=m8g0fxjHGAJ6o7PlqQ9frafB0SyO/k1sbpKH4pLP7DQgK2QE2pXwkv3udTEWNoMe9a qfN5NO8shP9AhmBhEDzPWLl3p/aRaGRBB81PDmiN27SnX+0EFvHR5TnHU2/RRwdFXO8x 1fGcqisYoIrQByN7WGyJ+xNOEvT97Qi3ih0AU+AGx3iJf+HPeV0vrjGjItNOy0f3vd0q 5SAWs8L5wxtL65/R4o6TglTm/hIaSow5Zwuzb3dWKD/25pwjhr9yFCg99z4WYH/XxuaM 9g8bhVVzyFqDTlwpOilT/LgcvM3SNGoMSvBookcebAWxboMebnl69KG+59YlJOVnDr8o 1dZQ== X-Gm-Message-State: APjAAAWDqOfAwfCpLxb4IBVwGmWYWcynFFYJYtr0Eru6hS4qYCea67c2 i363eWlWfInPb4mxv0XZzm51uQrw5w== X-Received: by 2002:a25:6154:: with SMTP id v81mr42530434ybb.404.1578336170601; Mon, 06 Jan 2020 10:42:50 -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 u136sm28223497ywf.101.2020.01.06.10.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 10:42:50 -0800 (PST) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: "J. Bruce Fields" Cc: linux-nfs@vger.kernel.org Subject: [PATCH 3/9] nfsd: Update the boot verifier on stable writes too. Date: Mon, 6 Jan 2020 13:40:31 -0500 Message-Id: <20200106184037.563557-4-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106184037.563557-3-trond.myklebust@hammerspace.com> References: <20200106184037.563557-1-trond.myklebust@hammerspace.com> <20200106184037.563557-2-trond.myklebust@hammerspace.com> <20200106184037.563557-3-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 We don't know if the error returned by the fsync() call is exclusive to the data written by the stable write, so play it safe. Signed-off-by: Trond Myklebust --- fs/nfsd/vfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 218b8293c633..38db4a083375 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -994,8 +994,11 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf, host_err = vfs_iter_write(file, &iter, &pos, flags); up_read(&nf->nf_rwsem); } - if (host_err < 0) + if (host_err < 0) { + nfsd_reset_boot_verifier(net_generic(SVC_NET(rqstp), + nfsd_net_id)); goto out_nfserr; + } *cnt = host_err; nfsdstats.io_write += *cnt; fsnotify_modify(file); -- 2.24.1