Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8187146rwp; Wed, 19 Jul 2023 06:31:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJW9ToRUPSOkxNmaZNDR9EXZaaRVnvLVqDactk3hIkpE2H1gbvXyXe+/wm/SnUdnYHtfWn X-Received: by 2002:a17:906:1ce:b0:982:25d1:bfd3 with SMTP id 14-20020a17090601ce00b0098225d1bfd3mr2325147ejj.15.1689773479780; Wed, 19 Jul 2023 06:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689773479; cv=none; d=google.com; s=arc-20160816; b=1LP1RRxj+SsaYFxYA4jHBNJYjK4u3lIKgDHAQbtjG/svuJxfP4lmvRD74IyyE0RSud Ay+IrJ0gGp4xN81BFzMx8T2RFDPUgfS/uzkp/E8Q9FTtCbPZk2+wV4lXrRW6qO0IPaPA dg9wPXSWOwSMZGyhmn2aH9K/v+dGAvS84CfvQLaARL78MwMcWCZbDFpM+W6Gve8q6etE Ju4jjpbdhPOI1owAtSiJTTLPhT6viRhqYXQBLF+6gSkV1HyTtZ8bwVlTSYuG2a0fWjPj 8w8kRD2WODxXW0jM+HBLBcdChwkr5j6plMR/hJZxHcTdWoN/GC5LcOHQeT0EVzSazkxE FsNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H+WScs5V062wBamLy/VYSwG2qEzMGnHGCJxs3puPkcM=; fh=S14JoeZoHwdZsgrgQbJK0jxn1EHPSYwRu/+vWM+gYDU=; b=ucp/JhxyRDaQuHbWtDpmM3FQSatY5sQBuyxGtRUOvF+WhLx0jr98YK0ROCV1x4Q+Bn s+yT8FXaNQt0ueWfi3wtEQ1i1vBrGVxINfMp4V1eLKtWQRwMVJVyu+oaqiDT50UNuGbr 7AW63JBim9M4M95wj3cqog2PwJuwnelnz2TOnZ0BNTnFNGJd39QbyDXcs0W0LQrfLjlj 82ufbmmuyW74/DJrYqwDshHomS+1zQbJJFreBtnX4bbGgM2I+xW7deAMdFxkVtdahTZm j1xZIrT8Si9K7fv3Qqyol2u6nH8SmYeNPp1bgSGASXA9de5+QIT2bJP2I84gqHi8smO9 BKrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TEd1HrVT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx16-20020a170906ca5000b0099b41f2c40fsi791139ejb.924.2023.07.19.06.30.45; Wed, 19 Jul 2023 06:31:19 -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=@redhat.com header.s=mimecast20190719 header.b=TEd1HrVT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbjGSNZi (ORCPT + 99 others); Wed, 19 Jul 2023 09:25:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbjGSNZh (ORCPT ); Wed, 19 Jul 2023 09:25:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD1DD119 for ; Wed, 19 Jul 2023 06:24:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689773089; h=from:from:reply-to:subject:subject: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=H+WScs5V062wBamLy/VYSwG2qEzMGnHGCJxs3puPkcM=; b=TEd1HrVTmPwkiiUu6MrcEVCRfJCkiaCKCG1FZaR4hsn5If34deQ3u5mfcWt7xQRQ8Fq4HK +sVeCL0/YCuP/Cpe+5I/y9v3j5QWt72uzO4Btvtvr+j22kyKAg5C3J/EzbM3MlpsFL51FY W5Ml4p8e1/DBB18n32h22ZpQz8FIU+Q= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-502-p4-rr414Pz6JgT17AE4n9w-1; Wed, 19 Jul 2023 09:24:48 -0400 X-MC-Unique: p4-rr414Pz6JgT17AE4n9w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8279F10504B2; Wed, 19 Jul 2023 13:24:47 +0000 (UTC) Received: from [192.168.37.1] (unknown [10.22.50.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A9D9940D2839; Wed, 19 Jul 2023 13:24:46 +0000 (UTC) From: Benjamin Coddington To: Kinglong Mee Cc: Anna Schumaker , Linux NFS Mailing List , Trond Myklebust Subject: Re: [PATCH v2] nfs: fix redundant readdir request after get eof Date: Wed, 19 Jul 2023 09:24:45 -0400 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On 18 Jul 2023, at 8:44, Kinglong Mee wrote: > When a directory contains 17 files (except . and ..), nfs client sends > a redundant readdir request after get eof. > > A simple reproduce, > At NFS server, create a directory with 17 files under exported director= y. > # mkdir test > # cd test > # for i in {0..16} ; do touch $i; done > > At NFS client, no matter mounting through nfsv3 or nfsv4, > does ls (or ll) at the created test directory. > > A tshark output likes following (for nfsv4), > > # tshark -i eth0 tcp port 2049 -Tfields -e ip.src -e ip.dst -e nfs -e > nfs.cookie4 > > srcip dstip SEQUENCE, PUTFH, READDIR 0 > dstip srcip SEQUENCE PUTFH READDIR > 909539109313539306,2108391201987888856,2305312124304486544,256633545246= 3141496,2978225129081509984,4263037479923412583,4304697173036510679,46667= 03455469210097,4759208201298769007,4776701232145978803,533840847851208126= 2,5949498658935544804,5971526429894832903,6294060338267709855,65288405662= 29532529,8600463293536422524,9223372036854775807 > srcip dstip > srcip dstip SEQUENCE, PUTFH, READDIR 9223372036854775807 > dstip srcip SEQUENCE PUTFH READDIR > > The READDIR with cookie 9223372036854775807(0x7FFFFFFFFFFFFFFF) is > redundant. > > Signed-off-by: Kinglong Mee Weird, I never got a copy from linux-nfs. The plain-text version of thi= s is whitespace damaged, but the HTML version looks right. Reviewed-by: Benjamin Coddington Ben