Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp462417rdb; Fri, 17 Nov 2023 04:06:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGioi4kw2MFjPhEIqzWzt7iJqCDra9beVsstbeCgZmz/8ZmASZ5/Hbq6yWldrln+u+RBnB6 X-Received: by 2002:a17:902:8b85:b0:1cc:5ed4:7b4c with SMTP id ay5-20020a1709028b8500b001cc5ed47b4cmr11811306plb.35.1700222818294; Fri, 17 Nov 2023 04:06:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700222818; cv=none; d=google.com; s=arc-20160816; b=vtGftAftx8NUa+YrtSa0vkMd+sHlxmNwi9hSdkZEWCcuI2CGcuT/p2NaHYihjfhgw/ E1jMuqnkKwzzOQIGlrkM1RIrxg3BCxyieEM8MrQkikWYGIyfHY71h6APxzlPN6E9yY4A MiulZPSNewn1VTCV0KxEjM0B8N/7p1WRVdRatZGecnFIePbxPIiiDEhF4mrZpTQtxLp0 OArHqlaRaMmeW2yVrqLRJlZPbSUJU6946AdGwd7m4SoK7/XDeXh2reOCzLODb8LO3YXA pyhKqzAgj8QM5Az5b+9am6urLT7mTHxeVQCKkaSYr+cQzXV1N/pO7Nr1UQdGWgOMDBt2 KIUg== 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=NMKQrCZaoUYMGzx8rAfQIqtvcnZhK7GowdQDyO4ye6o=; fh=5Y/VEGQG9Y1SAR8lTaXGVm/Fbmx450lHl0GjQYD7rYI=; b=twJti7+Yf8tWe/cDJx8wSooukrxWEjufHvjO6nE8+cZXze/uYJckG37qt/osJSGM52 Wap/Fx2M2ktFlxHw9y7MO17ui2bNKQo/ZQo67uXHrYWzixhb+qdUAhXuIdnBg2lHI7bB CmeY8XTyRV1Itp3oX2eo8OZcrW9T4YW4+6SMdth6cDdtUTaBNNv02Tn8WIT5K2jOEP1j iIDq+py2YXraT5mk4ema0cjDZFCHcnwsAHFgdgLRcufzMb3ky06X0J3JieOENYVQSHun Zp3XOMGg6uUpF1JmIr5QjmuR56ZwC40+6q8oq7if89114jQL8Z/Io6WDH61WgU3zqEkx 4GqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MD7rN3Vu; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q14-20020a170902dace00b001ce5b8081a5si1734947plx.382.2023.11.17.04.06.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 04:06:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MD7rN3Vu; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3FB99822B8F2; Fri, 17 Nov 2023 04:06:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231345AbjKQMG1 (ORCPT + 99 others); Fri, 17 Nov 2023 07:06:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231301AbjKQMG0 (ORCPT ); Fri, 17 Nov 2023 07:06:26 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC272C4 for ; Fri, 17 Nov 2023 04:06:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700222780; 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=NMKQrCZaoUYMGzx8rAfQIqtvcnZhK7GowdQDyO4ye6o=; b=MD7rN3VuILvpuKAVsYLjSc4EZcFJ/YBqfqZ1ncoEbkRj97m5LkBPf3/djevc/kMzO//biQ ScBCNbCI0Ga0D6nOXOa+kqNhGAOf6bA2IpdQuP9KNd9uuKzm9DtrulGma76IKwp3bZxTLm izKoVPDYQ+5U+s03oQVFqmYLPWF0XSk= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-7-CZP45C13Pqi4hjFBTrHQYg-1; Fri, 17 Nov 2023 07:06:18 -0500 X-MC-Unique: CZP45C13Pqi4hjFBTrHQYg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE2701C03D84; Fri, 17 Nov 2023 12:06:17 +0000 (UTC) Received: from [100.85.132.103] (unknown [10.22.48.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 564362166B27; Fri, 17 Nov 2023 12:06:17 +0000 (UTC) From: Benjamin Coddington To: Anna Schumaker Cc: trond.myklebust@hammerspace.com, linux-nfs@vger.kernel.org Subject: Re: [PATCH 2/2] NFS: drop unused nfs_direct_req bytes_left Date: Fri, 17 Nov 2023 07:06:15 -0500 Message-ID: <9F809D5D-9BA6-47A8-A3CA-AE783F612234@redhat.com> In-Reply-To: <9AF594B0-9477-4EB9-81F5-85A5F9BBAF87@redhat.com> References: <21a1f2a6155398965f79ed64f0bd23bf38a50367.1700083991.git.bcodding@redhat.com> <952eea7e97246870f83e7a4592e9338007dfe625.1700083991.git.bcodding@redhat.com> <9AF594B0-9477-4EB9-81F5-85A5F9BBAF87@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 17 Nov 2023 04:06:35 -0800 (PST) On 17 Nov 2023, at 6:21, Benjamin Coddington wrote: > On 16 Nov 2023, at 17:11, Anna Schumaker wrote: > >> On Thu, Nov 16, 2023 at 5:03 PM Benjamin Coddington wrote: >>> >>> On 16 Nov 2023, at 16:44, Anna Schumaker wrote: >>> >>>> Hi Ben, >>>> >>>> On Wed, Nov 15, 2023 at 4:34 PM Benjamin Coddington wrote: >>>>> >>>>> Now that we're calculating how large a remaining IO should be based >>>>> on the current request's offset, we no longer need to track bytes_left on >>>>> each struct nfs_direct_req. Drop the field, and clean up the direct >>>>> request tracepoints. >>>> >>>> I've been having problems with xfstests generic/465 on all NFS >>>> versions after applying this patch. Looking at wireshark, the client >>>> appears to be resending the same reads over and over again. Have you >>>> seen anything like this in your testing? >>> >>> I have generic/465 failing before and after these two patches on pNFS SCSI.. >>> but at least it completes. If I run it without pNFS I can see the same >>> thing.. it just sends the same reads over and over. I'll figure out why. >> >> Thanks! I have it failing normally as well, so that's expected. It's >> the hanging forever that's not :) > > The direct read is returning 0 when there's data on the device. > > Oh, the problem is probably that patch drops the update of dreq->max_count, > which I overlooked because of the double assignment. Shame on me. BTW - I think generic/465 makes bad assumptions about what read() should return for O_DIRECT, and that's why it fails on NFS. Basically it does a bunch of WRITEs and then READs and expects the same data coming back in the READs, but doesn't use O_SYNC. On the wire, the client is interleaving the READs and WRITEs. Ben