Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1160680rwr; Wed, 26 Apr 2023 10:50:07 -0700 (PDT) X-Google-Smtp-Source: AKy350Y+3Z5iq4okW7WEMtNUxpLmy5K8cX4r0R+0iWYdZGF3dfuQtertYjHjkGg34IJWmIH6pEOy X-Received: by 2002:a17:90b:28b:b0:246:91d0:9e6f with SMTP id az11-20020a17090b028b00b0024691d09e6fmr22601673pjb.3.1682531407600; Wed, 26 Apr 2023 10:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682531407; cv=none; d=google.com; s=arc-20160816; b=o9ufdX+qFGeewuqtPcJvjeIsGBaGu5Q6hm6kWPL2F9LgqxkeQ1Gag3SqVZsK9zwsap g9jnu2e/vysLrscMjIWT87ePDPU38U4dQKo63wD8TrNOihu0vd3h6prOPT3vwLuV80CR uI8uDdJDC9r+otqKu3geUYjcaaRF3vrM41z4ZVxHx5c2mJLzjHCTsJXBX30qTuHbbLYH 8qPf6mBUdNRz7v8eBbOSHM5qfbCFVnu6BMsbdkYcT+0nwl2TccbakM+5wmnQQC+AoAtR FIuaOOSkcxqKsCd6YtvrM1i1E1m5T/j+zSaRfiyA52X3nVHFQG1tZpi5G9Jpg3CV8cuR iUBA== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=LTUkzilxp2Tf3FT5/MsOuGOHHwxgd7GgTNhhEQ0D29w=; b=ElkSB1YGA4a0Tdx+YeD4RtAzJ2Ern7gE1YgiUdmsKp49TBcHzlz/DdJ7hs7RZoHCDu 3Lq6UNEk4JyfuJZVfcd9I3BS7QsEkaojshUedluKzxgtxanzbU37ZrpJRDJecesdLDFl 3ftB0OxhlnMUuuPBkqA0NvLdAolG8ow8p0c3sdfdKQF8M3sfbLxZpX/7P86lc4+KI3w1 wEwXae8xBBHIls8QkHcTmC8RMwS5Dsrrva9nCebHWaT7z819UJFx9uLQ17OBunixoU1L FnnazrEkChPCStCos4zXKAs7s8dABdm8B94QJqwMobpOGSImnnc6h7c03v8/EhfWSDcb VdJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="pXdqe/B/"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=+luw71My; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a17090a8b0c00b0024bda568513si5145560pjn.123.2023.04.26.10.49.44; Wed, 26 Apr 2023 10:50:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="pXdqe/B/"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=+luw71My; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239056AbjDZRnB (ORCPT + 99 others); Wed, 26 Apr 2023 13:43:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236381AbjDZRmz (ORCPT ); Wed, 26 Apr 2023 13:42:55 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7CCB35A5 for ; Wed, 26 Apr 2023 10:42:54 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 75AA31FDD6; Wed, 26 Apr 2023 17:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1682530973; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LTUkzilxp2Tf3FT5/MsOuGOHHwxgd7GgTNhhEQ0D29w=; b=pXdqe/B/yvsrMUlR9+2G77Qp5jEly0Acrivu3e3ewu83DKiAOA9xfvC3jfzFCc7yiZMDEr 26FO9FWE+1i/NqC+CLfrAhAeWpS0wNT4AW7tzPa1ixhFFgeOsNOxC06aKAM9T/CYJnO7up VxV/HYBfUZ9+DJKpdlRZvXkipzaGF6U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1682530973; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LTUkzilxp2Tf3FT5/MsOuGOHHwxgd7GgTNhhEQ0D29w=; b=+luw71MyZtxmMqMxvfjoW7jZTAT87zgTk+2sUTV9hnujK3nyxRQFq/21OvspLXnc9jmk1Q r1bIGUtKYR7w9NBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BCACE138F0; Wed, 26 Apr 2023 17:42:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id giiPKZxiSWQ2TQAAMHmgww (envelope-from ); Wed, 26 Apr 2023 17:42:52 +0000 Date: Wed, 26 Apr 2023 19:43:02 +0200 From: Petr Vorel To: Cyril Hrubis , NeilBrown , ltp@lists.linux.it Cc: linux-nfs@vger.kernel.org Subject: Re: [LTP] [PATCH 1/1] nfs/nfs08.sh: Add test for NFS cache invalidation Message-ID: <20230426174302.GB3089461@pevik> Reply-To: Petr Vorel References: <20230412082115.1990591-1-pvorel@suse.cz> <20230425134845.GA3014439@pevik> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230425134845.GA3014439@pevik> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Hi all, > > Hi! > > > v4 [1] of not yet upstreamed patch accidentally broke cache invalidation > > > for directories by clearing NFS_INO_INVALID_DATA inappropriately. > > > Although it was fixed in v5 [2] thus kernel was not actually broken, > > > it's better to prevent this in the future. > > > [1] https://lore.kernel.org/linux-nfs/167649314509.15170.15885497881041431304@noble.neil.brown.name/ > > > [2] https://lore.kernel.org/linux-nfs/167943762461.8008.3152357340238024342@noble.neil.brown.name/ > ... > > > --- /dev/null > > > +++ b/testcases/network/nfs/nfs_stress/nfs08.sh > > > @@ -0,0 +1,20 @@ > > > +#!/bin/sh > > > +# SPDX-License-Identifier: GPL-2.0-or-later > > > +# Copyright (c) 2023 Petr Vorel > > > +# Test reproducer for broken NFS cache invalidation for directories. > > > +# Based on reproducer from Neil Brown > > > + > > > +TST_TESTFUNC="do_test" > > > + > > > +do_test() > > > +{ > > > + tst_res TINFO "testing NFS cache invalidation for directories" > > > + > > > + touch 1 > > > + EXPECT_PASS 'ls | grep 1' > > > + > > > + touch 2 > > > + EXPECT_PASS 'ls | grep 2' > > > +} > > I do not get how this actually detects case invalidation, it probably > > does, but slightly better description how this actually excercises the > > case would help. > The behavior is: > "touch 1" asks for data invalidation (new file created), therefore following ls > (EXPECT_PASS 'ls | grep 1') fills the cache. "touch 2" should again ask for > data invalidation, but it the unfixed v4 version of the patch it did not > resulted to cache invalidation. Therefore second ls (EXPECT_PASS 'ls | grep 2') > shows just 1, but not 2. i.e. in the affected kernel only second ls failed, > but obviously both should be checked (nobody knows how another bug on cache > invalidation will behave). > I can add the description above to the commit message and adjust the comment in > the file. Merged with the updated description. Kind regards, Petr