Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1058595rdb; Fri, 20 Oct 2023 07:23:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNOBYt+eJzQGbwuY/1d+QsCqCP2Tq2qjV9A2Avf58QJq3kWy+8Wpi0qDknaRczMT4BWOcu X-Received: by 2002:a05:6358:4404:b0:139:d5b9:87d3 with SMTP id z4-20020a056358440400b00139d5b987d3mr1750352rwc.5.1697811810700; Fri, 20 Oct 2023 07:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697811810; cv=none; d=google.com; s=arc-20160816; b=MFU5KuALajQcnPSDOB9R3fIAKzFB3F73Qp7kVHygaIMzHM26xc+ew0hxLpLi4vexa3 JzGdvmI66tNFRPiOaT3TBBn5l+WKaqUvL1VaL+Vd3bgTVJ0j3dUyDZ1pKHnJxUcUg2wt xBz0scZhDqGxyFq5LnFVPNT7KoeSXt0nJyHIeGPX0KS13u4SwtkIEumPPuXeCoUhz7wF cevzRbLFZmJAgjaUdwU3CZfT3AgTrho5Ol5W/HJDjyEnWk2F2KAP/Zqyq2hkDOCaMu5v Z8apLlUIGdP5wtKTavjWeS1t4kd/RVC6n9PXdfVGHq8ZjyvYtp/CVmjR5G43tLVyYEun +ahw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0+30gns8dATB4ox0+rNrNi5PqASbvxUq75f+kERnLvc=; fh=Ojtkk3MHj4hoPuVuS6hnOhAwR3I0kKXVkTsr63v0A5I=; b=FyC8eUSOYBfJF0yHYnyg1Ef7ULGfQGoLJz96fzYqLSrQPPPnVW2TeHDOy5W8AM1n2b Mk/5bY4sUp71knqu7xKm3z8rHEQ1lpaoc6CUeAehLW7MJEz+P2wZ/2JnFvW6+iz6Rkjb 09+sae2w7WCee8xfzLtT0+wYobgwGgUsOSfwmjZyL7YAuVvvikE4UVhT6/LJKHLSdxzc jruAbXDiy/TzCJgBf4xY2YCt53cl+aliaClX+wM1kVR32BIcNQ4oUcmvWnqSVcFdo1Qh 1FNKUO/pOUy1JYMa/e1qw+pQVle39vZyVUkWJh9wSECAehYBFeU3ZU6lYl6Ti20istkm trsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=djB+zb9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id z1-20020a633301000000b005b8357f7450si1930189pgz.207.2023.10.20.07.23.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:23:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=djB+zb9L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id CDA3E81CF404; Fri, 20 Oct 2023 07:23:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377526AbjJTOXA (ORCPT + 99 others); Fri, 20 Oct 2023 10:23:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377477AbjJTOW7 (ORCPT ); Fri, 20 Oct 2023 10:22:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B998AD52; Fri, 20 Oct 2023 07:22:57 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B231C433C7; Fri, 20 Oct 2023 14:22:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697811777; bh=8UjVHIG4pHIzf6WnY8xNDmsWFhbzt0q7zzNVbYQt34w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=djB+zb9L+53nV76+X/jaRZ1crfQvUPWje3uBQ/SrTXVat4NRJ0uOINVVpGVmH7FOz b5p1TJvVz4aMzWyyIMHwCp75/sUVC/q51WZykYuU99mt0spXwMRTrWEsGwGHtTiOZd TghHscFG3QzS3pucUGl6OLi2RuCxpAXYI30ZhRzw= Date: Fri, 20 Oct 2023 16:22:53 +0200 From: Greg Kroah-Hartman To: NeilBrown Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, torvalds@linux-foundation.org, stable@vger.kernel.org, lwn@lwn.net, jslaby@suse.cz Subject: Re: Linux 6.1.58 Message-ID: <2023102016-wanted-trash-a8c8@gregkh> References: <2023101518-subscript-entity-be71@gregkh> <169778656748.20306.1670865069010793541@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <169778656748.20306.1670865069010793541@noble.neil.brown.name> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 20 Oct 2023 07:23:23 -0700 (PDT) On Fri, Oct 20, 2023 at 06:22:47PM +1100, NeilBrown wrote: > On Mon, 16 Oct 2023, Greg Kroah-Hartman wrote: > > I'm announcing the release of the 6.1.58 kernel. > > > > All users of the 6.1 kernel series must upgrade. > > > > The updated 6.1.y git tree can be found at: > > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y > > and can be browsed at the normal kernel.org git web browser: > > https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary > > > > thanks, > > > > greg k-h > > > > ------------ > > > > Makefile | 2 > > fs/nfs/direct.c | 134 ++++++++++++++--------------------------------- > > fs/nfs/write.c | 23 +++----- > > include/linux/nfs_page.h | 4 - > > lib/test_meminit.c | 2 > > 5 files changed, 55 insertions(+), 110 deletions(-) > > > > Greg Kroah-Hartman (7): > > Revert "NFS: More fixes for nfs_direct_write_reschedule_io()" > > Revert "NFS: Use the correct commit info in nfs_join_page_group()" > > Revert "NFS: More O_DIRECT accounting fixes for error paths" > > Revert "NFS: Fix O_DIRECT locking issues" > > Revert "NFS: Fix error handling for O_DIRECT write scheduling" > > FYI the problem with these NFS patch is now described in comment #4 of > https://bugzilla.kernel.org/show_bug.cgi?id=217999 > which I include below. They can be reapplied if the "Fix error > handling..." patch is fixed up as described. > > NeilBrown > > FYI the cause of this corruption is that the backport of > NFS: Fix error handling for O_DIRECT write scheduling > > had an error. > The backported patch f16fd0b11f0f4d41846b5102b1656ea1fc9ac7a0 > moves "pos += req_len" in nfs_direct_write_schedule_iovec() from after > req->wb_index = pos >> PAGE_SHIFT; > to before that statement. This ->wb_index is wrong. > Possibly a better way to look at this is the use of "pos" is moved to *after* it is updated. > > The upstream patch 954998b60caa8f2a3bf3abe490de6f08d283687a > doesn't move the use of pos because > Commit 70e9db69f927 ("NFS: Clean up O_DIRECT request allocation") > > removes the use. > > v6.1.56 can be fixed with > > diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c > index 5a976fa343df..69134e11e7d0 100644 > --- a/fs/nfs/direct.c > +++ b/fs/nfs/direct.c > @@ -864,6 +864,8 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq, > result = PTR_ERR(req); > break; > } > + req->wb_index = pos >> PAGE_SHIFT; > + req->wb_offset = pos & ~PAGE_MASK; > > if (desc.pg_error < 0) { > nfs_free_request(req); > @@ -883,8 +885,6 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq, > } > > nfs_lock_request(req); > - req->wb_index = pos >> PAGE_SHIFT; > - req->wb_offset = pos & ~PAGE_MASK; > if (nfs_pageio_add_request(&desc, req)) > continue; Nice, thanks for digging into this. I think I'll leave this be for now, until someone submits a fully backported, and tested, series that they are willing to say actually works :) thanks, greg k-h