Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1014243rbb; Sun, 25 Feb 2024 15:19:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXZiCaVDsLL79mpcGeskH4Rn7rmAOvW5QAYlvC+KapDbJRHsCwDoIpZQdIXKjJ/hA/2qMYcN2xY4uuKFhRgtdHU02aVKCmgcLP8wxLEjA== X-Google-Smtp-Source: AGHT+IHHC7zn2gHJfqJyRe6sWlsCBrRgyGnSu/7AQSrWlc6UxiOG3X3nIQFSDAKbduMCdnv80cU+ X-Received: by 2002:a05:6358:190a:b0:17b:2bc6:e843 with SMTP id w10-20020a056358190a00b0017b2bc6e843mr8673670rwm.18.1708903163840; Sun, 25 Feb 2024 15:19:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708903163; cv=pass; d=google.com; s=arc-20160816; b=vDat0hK08vjeIMc1CG5y2kGBTOD+OriEDAT5qOE85pLewdFsbdf9kqSQyTd7Iv1GhF ZatqsjZ7H3kCa9HRteLJjz7k15QYVmGv+sWTZI0HJf3Ci856286nHtctmMK2aWg68eMm A0jsM3iKneF9Vj7WCGTCcFyMasAfABqamkNjgWg12uTBl8CVrbEUwMxIt3V/a8529BEh FgHzqbAMljx9hNetuQClJyY4VyzpQAe7I2FsEsX8FMOnQJsTWt/s6IGgQMpVv2f2LSTL Iuzg26BCzd97RUSMcyXfZQrLh+dL/p8OJtO49/qhG+fMCvaYaoCWO9AUWXMEKSpIR57y 2Ziw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:references:in-reply-to:subject:cc:to:from :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=EL7IrpQyam8/xJ3PnuPmhMw6711+BfeHlinpyiycVCE=; fh=Iul3yTgYX7C3QiH+MFPgfDTWkH14Wjt2jVARDdZRMek=; b=ITKeyoftr74UaHFafC61FXdX9cy8AGzCSqA9uBon6eafY27gSqLgj6zOmW+HwGbYrO eiXE6iexAMFhqG5o1Xl8FwTnCdONY8AoqdfNmdTKa9K//1Ng53cqOI7x6B13YF74l9WD 3kD1JtPelkwHfmxEJsOg5uHA1XBNM7XIBcXO1uBRbJtV+hmfTwCRS2n0ZNj+/lRFhexm ZLE/7plGSXisslDXr0tuP+eRELjbT9H6W7rhQ7XrEWya+J8p4oyU1gz65hgIKMvhUZAU PgBP1Igttmy9M7xvMYVGsb2c6eaV6wb/MH26S3wKslDXZGg/Eq4gyjnAWrtispSuz0PG APzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Zww1bbDp; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Zww1bbDp; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-nfs+bounces-2073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2073-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fb30-20020a056a002d9e00b006e50a0b4a36si1535354pfb.139.2024.02.25.15.19.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 15:19:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Zww1bbDp; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Zww1bbDp; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-nfs+bounces-2073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2073-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 543C3281657 for ; Sun, 25 Feb 2024 23:19:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 189D41BC2F; Sun, 25 Feb 2024 23:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Zww1bbDp"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6x7Oum5J"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Zww1bbDp"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6x7Oum5J" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DBF91B96E for ; Sun, 25 Feb 2024 23:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708903162; cv=none; b=qgGRdq1H10o+viulaNw5jHvH2krZC0fIPucUnnOahgL4JkgyN4hyt1ClNPkGPyOt5KCZ/eQDPzLmZ3tUPXJBStnpk118TbHAIe0UPrhPWfXOHCnnPd6E6+sGnnjusUuGlFiNLF8UW1Of2xQHiBKxmAtTJgfcEab4ZXLvWDBfvcw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708903162; c=relaxed/simple; bh=yG9VK6sYoKL048BNDlWVezDntTk+6IaNxaDCzd/sRRU=; h=Content-Type:MIME-Version:From:To:Cc:Subject:In-reply-to: References:Date:Message-id; b=oWweGFBRJA7UaG7Uo/UGlEJ7xfY5bFPmUOidxFoJt1RwyhdsdYnH6lMq/56EmlXR8B1l4sCGJKcowdT4pEpM+SJZVn6n1BiJlFXpfxOAsNRopxzaBGEUCJRJzs2uuDwLiTOIGFSQniw1RUQrnJsZKZtMEh9m94vq1bcNGU761lA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Zww1bbDp; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6x7Oum5J; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Zww1bbDp; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6x7Oum5J; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 538D32249B; Sun, 25 Feb 2024 23:19:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708903158; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EL7IrpQyam8/xJ3PnuPmhMw6711+BfeHlinpyiycVCE=; b=Zww1bbDp/BiU7Xms07SBT8gS7Uva+YN19AOiKCCXw4H37JM2rDBq5YlBFkBdsmX6zO9BJ/ eggEO21AL7+DJjnaDkY47i3cIGJFwidysNiWr+DkVfmKSMbZqzK1DPf9kHbEvH3UERY80Z oIe2q8TnILMpiB+MVKvmkfLQzhrJri4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708903158; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EL7IrpQyam8/xJ3PnuPmhMw6711+BfeHlinpyiycVCE=; b=6x7Oum5JnEAtdyPsOHWe/QoB0pZaw6yPX1IPJq2bo7DWw7hUx+6KKJb8IGhocFnZ9x0PHP AMrtDJWKQDSRGsCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1708903158; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EL7IrpQyam8/xJ3PnuPmhMw6711+BfeHlinpyiycVCE=; b=Zww1bbDp/BiU7Xms07SBT8gS7Uva+YN19AOiKCCXw4H37JM2rDBq5YlBFkBdsmX6zO9BJ/ eggEO21AL7+DJjnaDkY47i3cIGJFwidysNiWr+DkVfmKSMbZqzK1DPf9kHbEvH3UERY80Z oIe2q8TnILMpiB+MVKvmkfLQzhrJri4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1708903158; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EL7IrpQyam8/xJ3PnuPmhMw6711+BfeHlinpyiycVCE=; b=6x7Oum5JnEAtdyPsOHWe/QoB0pZaw6yPX1IPJq2bo7DWw7hUx+6KKJb8IGhocFnZ9x0PHP AMrtDJWKQDSRGsCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6225B13A89; Sun, 25 Feb 2024 23:19:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id oO7yAPTK22XRHwAAD6G6ig (envelope-from ); Sun, 25 Feb 2024 23:19:16 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "NeilBrown" To: "Jacek Tomaka" Cc: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, linux-nfs@vger.kernel.org Subject: Re: NFS data corruption on congested network In-reply-to: <170890214013.24797.3257981274610636720@noble.neil.brown.name> References: , <170890214013.24797.3257981274610636720@noble.neil.brown.name> Date: Mon, 26 Feb 2024 10:19:08 +1100 Message-id: <170890314859.24797.16728369357798855399@noble.neil.brown.name> Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-3.10 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_ENVRCPT(0.00)[poczta.fm]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_TO(0.00)[poczta.fm]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: -3.10 On Mon, 26 Feb 2024, NeilBrown wrote: > On Fri, 23 Feb 2024, Jacek Tomaka wrote: > > Hello, > > I ran into an issue where the NFS file ends up being corrupted on disk. W= e started noticing it on certain, quite old hardware after upgrading OS from = Centos 6 to Rocky 9.2. We do see it on Rocky 9.3 but not on 9.1. > >=20 > > After some investigation we have reasons to believe that the change was i= ntroduced by the following commit:=20 > > https://github.com/torvalds/linux/commit/6df25e58532be7a4cd6fb15bcd858059= 47402d91 >=20 > Thanks for the report. > Can you try a change to your kernel? >=20 > diff --git a/fs/nfs/write.c b/fs/nfs/write.c > index bb79d3a886ae..08a787147bd2 100644 > --- a/fs/nfs/write.c > +++ b/fs/nfs/write.c > @@ -668,8 +668,10 @@ static int nfs_writepage_locked(struct folio *folio, > int err; > =20 > if (wbc->sync_mode =3D=3D WB_SYNC_NONE && > - NFS_SERVER(inode)->write_congested) > + NFS_SERVER(inode)->write_congested) { > + folio_redirty_for_writepage(wbc, folio); > return AOP_WRITEPAGE_ACTIVATE; > + } > =20 > nfs_inc_stats(inode, NFSIOS_VFSWRITEPAGE); > nfs_pageio_init_write(&pgio, inode, 0, false, Actually this is only needed before linux 6.8 as only nfs_writepage() can call nfs_writepage_locked() with sync_mode of WB_SYNC_NONE. So v5.18 through v6.7 might need fixing. NeilBrown >=20 >=20 > though if your kernel is older than 6.3, that will be > redirty_for_writepage(wbc, page); >=20 > Thanks, > NeilBrown >=20 >=20 > >=20 > > We write a number of files on a single thread. Each file is up to 4GB. Be= fore closing we call fdatasync. Sometimes the file ends up being corrupted. T= he corruptions is in a form of a number ( more than 3k pages in one case) of = zero filled pages. > > When this happens the file cannot be deleted from the client machine whic= h created the file, even when the process which wrote the file completed succ= essfully. > >=20 > > The machines have about 128GB of memory, i think and probably network tha= t leaves to be desired. > >=20 > > My reproducer is currently tied up to our internal software, but i suspec= t setting the write_congested flag randomly should allow to reproduce the iss= ue. > >=20 > > Regards. > > Jacek Tomaka > >=20 >=20 >=20 >=20