Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp111373pxh; Thu, 7 Apr 2022 15:38:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9IEhc3xKgMqA47oZnR59ikZvY84sTdD7eMZAmTxaCOTM4auAsS1hOupZok5SjtzmmO5xp X-Received: by 2002:a17:90b:4c09:b0:1cb:1463:3f2b with SMTP id na9-20020a17090b4c0900b001cb14633f2bmr5352530pjb.224.1649371105860; Thu, 07 Apr 2022 15:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649371105; cv=none; d=google.com; s=arc-20160816; b=hdUl8rQsx+6n4rnSY+S6fepqnNabjhZFEEzFbwxXmFRIPi2dBFD8Kli7TpPix1E0HA qmpz3VTT91hZkIKbpKNQDFZxkboF3q6y0REGKOo7wo6yzsttVZYXOxW5lYWicJj5nRQv 0ZWY7B+qvG+h+VblN2MJbgbPw5dORchtE4U7kHkS7QY/zbODmoQHqrsR3hCjjOSKbr5Q x6kcTqNRTAnFg9mPSYaST2v7GDOFIJ39JWnE/PpyxsByt5z9L0GiJy/fZ55aUmcwUXKi gcpOy77gL9fY641DHP/0EWIir+9Wh2ly3UBdPfmVbBge1ugSV95dv+T0B3VHLmBvM7ib FqKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=58SSCJZXblAmvBhjeOB3uU7MwelxZJPYCI86bkrnS8E=; b=D7bvrt8DF/gyljINO+tOI2tYCu4mlc5/QDU9unw/ORWYRLl+UqG9vMqwR/5e0HUhLe Xbc84GslEOJQvpFOsfbZVOOGVKYfUKRqf3Um6elU8NE+HPWfXXYMZTFqWsV8VDb2AesA r7g/8ANYzKgiVvLqmvm9Ku83m2EZewisU9Ou/NKsGqwhIkz+N5t5lxpT24I2LZjlbmKM 4Tk+9jMSBDgIlWoiy1MtwJ3Am9So6N6IU4QS1wMrWbx/EKR8rQZ8ra83JDO3BkuQEPZO P3hQKJkcqUnxdB4OZoAWSPd9hGKxUM6obWI6xxWdYbdrVM+BK/DOh7KXmoHY2DK2DiTn WZ1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=XgwIWPe4; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x9-20020a170902ec8900b00156bddf0f3csi1159624plg.53.2022.04.07.15.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 15:38:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=XgwIWPe4; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BB2BF19B09B; Thu, 7 Apr 2022 15:09:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232073AbiDGWKz (ORCPT + 99 others); Thu, 7 Apr 2022 18:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232068AbiDGWKu (ORCPT ); Thu, 7 Apr 2022 18:10:50 -0400 Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E3A22AD096 for ; Thu, 7 Apr 2022 15:04:31 -0700 (PDT) Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-de3eda6b5dso7953067fac.0 for ; Thu, 07 Apr 2022 15:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=58SSCJZXblAmvBhjeOB3uU7MwelxZJPYCI86bkrnS8E=; b=XgwIWPe4EmdEZzg2aaVL2kxNLbvNgtQDgA6CSmpYKHkmeCwbHkMVlvkx7EZXnFHO7x J4SENl4Kv459oEqbYIEqiYidiPRy2CAjIFGXnioedXGzr36OF1H2DkSJyBMBC6z2evxG ujxE2friAAG/Zl0uHBA5b6H+yYJKsHEbPH6JWlM7x9jyydRQcfHfaG4RYdDuX4izPVUy BUlIz/KJJJd3RmEBjuwka9CSK4AWLbHSWUwXCMjbjS1cOWXJCdVd70StvQcN6RjGDRYR LWZcR6+S/E+oBAOD/XW6YTBmfANzfiNjyarFB/JqspP7loBQBTX5qFG7/McZ3M07LdLI ItUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=58SSCJZXblAmvBhjeOB3uU7MwelxZJPYCI86bkrnS8E=; b=w4n1uI9mUDq/3bidIu4HKnR2+cS4BBBavNNsluZ251gIENvb3yHh+yelli9rc0l7/d yU8yq1nDie6h67NdEp5KonXZvaQ1tZyX9q+vT7npdTsHMSzIaOTgEeJGjutfoq9SqCvV THdgz36O/mxWsq4CDl0fWOrwubP4Yl5gJf4tsa6O2wR1wzVlXvLwctodc1VZISWasK8V er9Kb08waQwQLrw55JlBOD8ssWgY4TnT+TPdZ9ANmfSKUwQW0RS1leQUDfhN0YvPwr2K TIvksSin6pIbAhkuFSVkMi5ERbBM+/7FKbR2QP+n9bVvZtsTmi+QnPQNk9qbkl6smc0L 2/Cg== X-Gm-Message-State: AOAM532ccJAO4Nwsle3yRgHUTOLcKoKcHFhRNioX2Sahz7/4FIP45BRH VzGimShS+O2vXhWaXJLwEj/SHA== X-Received: by 2002:a05:6870:e990:b0:de:9b72:c80 with SMTP id r16-20020a056870e99000b000de9b720c80mr7234558oao.118.1649369069975; Thu, 07 Apr 2022 15:04:29 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id r8-20020a05683001c800b005cdadc2a837sm8359376ota.70.2022.04.07.15.04.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 15:04:29 -0700 (PDT) Date: Thu, 7 Apr 2022 15:04:17 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Mark Hemment cc: Hugh Dickins , Chuck Lever III , Andrew Morton , Patrice CHOTARD , Mikulas Patocka , Lukas Czerner , Christoph Hellwig , "Darrick J. Wong" , Linux-MM , Linux NFS Mailing List , linux-fsdevel@vger.kernel.org Subject: Re: Regression in xfstests on tmpfs-backed NFS exports In-Reply-To: Message-ID: <5256a357-213e-84e9-a07f-f695cbb68272@google.com> References: <673D708E-2DFA-4812-BB63-6A437E0C72EE@oracle.com> <11f319-c9a-4648-bfbb-dc5a83c774@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, 7 Apr 2022, Mark Hemment wrote: > On Thu, 7 Apr 2022 at 01:19, Hugh Dickins wrote: > > > > What could be going wrong there? I've thought of two possibilities. > > A minor, hopefully easily fixed, issue would be if fs/nfsd has > > trouble with seeing the same page twice in a row: since tmpfs is > > now using the ZERO_PAGE(0) for all pages of a hole, and I think I > > caught sight of code which looks to see if the latest page is the > > same as the one before. It's easy to imagine that might go wrong. > > When I worked at Veritas, data corruption over NFS was hit when > sending the same page in succession. This was triggered via VxFS's > shared page cache, after a file had been dedup'ed. > I can't remember all the details (~15yrs ago), but the core issue was > skb_can_coalesce() returning a false-positive for the 'same page' case > (no check for crossing a page boundary). Very useful input: thank you Mark. That tells me that, even if we spot a "bug" in fs/nfsd, there could be various other places which get confused if given the ZERO_PAGE(0) twice in a row. I won't be able to find them all, I cannot go on risking that. At first I thought of using ZERO_PAGE(0) for even pgoffs, alternating with a tmpfs-specific zeroed page for odd pgoffs. But I was forgetting that copying ZERO_PAGE(0) is itself just a workaround to avoid the 28% slower iov_iter_zero(). I think I have a reasonable hybrid: will reply to Chuck now with that. Hugh I've rewr