Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2882372rdb; Wed, 15 Nov 2023 13:30:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAlKTnY77u2akChmpqvBZeHqVmyIhF6yrDwvlzRn8UuU464N2uM45b5xT2wzRaRqIoBc6n X-Received: by 2002:a05:6a00:148c:b0:6be:4228:6970 with SMTP id v12-20020a056a00148c00b006be42286970mr15319386pfu.21.1700083853330; Wed, 15 Nov 2023 13:30:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700083853; cv=none; d=google.com; s=arc-20160816; b=amRs92Khjj+BqwUXoKQFmu3yaTTKQNqOzF39gTrcaNJxn92i/DPJogesbvcx4Sczef UfHkCl72Tr6jYtUP3WdT+sJ60qW1sNAbjZis3L/VMeYm9QRVxmN+IsYH2CPIXnm0f7en hxee9fyzRZVIjpPC/CpQuk4aXL5qVAMN9bQCkKJ6v5KebBUuRlu1lwSnbqdGyoPsagRn f7TildscRAx0kGE8d0lO4yFmw9XZ2gwLBoOdrlesTP7QE8bwUC5AEK/VXhkMgnaGrEjg BOFE8oa/f2qKRPSbGF2Ckw4dMbEUjoju1KhyFvw4178R9TlULr5V7emSJ0TXtN4X69Gh 7Ybg== 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=k56wC+pGLOwt4XbshGoji6Hvi02WpE56/rAAKXV/DRo=; fh=nQvMWqQ/v0LpI35XLl1r5rtkfHXKzYQJKYxV+U6EVJc=; b=Gdwc21Rk9s09n5oYS85uxtGFlIEKKjzX4l0JwrHLhPt4IWnF0cBBkHGKWbGZIyXmhn D6csAG9J4gMGRSmSs8shwopDHfnF9z6CKvTYJBo9GqxE1vQRqB7DHcS5/quWQ7rWcJTs vrg7vl2COhKDsfrxTGevZffOsQlc1X22DB+f2dj9DK5In16ybA6b3gwYOXAxX1VlVKwd XNd80gtjD2s8mmsfCE6luxlk4RBUDbiyRlOZsI8KotoIYaBWQG5yy4ZFNPCe9FRNr/gf CotG6KeSut/EqrWFRRtSSalysSc3dhQ6bHGi5p9xvnLWiBaQ7Bro9irmMovX5lntCvvZ tgsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="JWUN/vmU"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id fb30-20020a056a002d9e00b006910a45a234si11198870pfb.202.2023.11.15.13.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 13:30:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="JWUN/vmU"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 894F08089A12; Wed, 15 Nov 2023 13:30:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235065AbjKOVad (ORCPT + 99 others); Wed, 15 Nov 2023 16:30:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbjKOVad (ORCPT ); Wed, 15 Nov 2023 16:30:33 -0500 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 9C57A92 for ; Wed, 15 Nov 2023 13:30:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700083828; 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=k56wC+pGLOwt4XbshGoji6Hvi02WpE56/rAAKXV/DRo=; b=JWUN/vmU9krD1slgGr1++mrfVRQtVk+Fs49+7vABlTgbedN687EMS4jBcyPUnj6Iv8fdj5 m+bEWkTK2SqF/0Ij3AoRkG56boccxm7vZvKKWC3XJ8o70DG5ClbyxVngx0nvGLEjkQWL3H Khns8VIIlHPhvfQz14Fk0EKwCayP7Z0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-14-tzhh5i-4PWmAzYuLRWmMFw-1; Wed, 15 Nov 2023 16:30:27 -0500 X-MC-Unique: tzhh5i-4PWmAzYuLRWmMFw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 EBA67185A780; Wed, 15 Nov 2023 21:30:26 +0000 (UTC) Received: from [100.85.132.103] (unknown [10.22.48.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 296061C060AE; Wed, 15 Nov 2023 21:30:25 +0000 (UTC) From: Benjamin Coddington To: Trond Myklebust Cc: linux-nfs@vger.kernel.org, anna.schumaker@netapp.com Subject: Re: [PATCH v2 1/5] NFS: Fix error handling for O_DIRECT write scheduling Date: Wed, 15 Nov 2023 16:30:24 -0500 Message-ID: In-Reply-To: <73e48b3b4e835231a1c2a79613baf6bb01d3f6a3.camel@hammerspace.com> References: <20230904163441.11950-1-trondmy@kernel.org> <20230904163441.11950-2-trondmy@kernel.org> <02FDFFF6-8512-4BBA-845D-72C21864E621@redhat.com> <44d134dd65a4c7194f5200a390e5229003ba4016.camel@hammerspace.com> <4EBFA030-C144-4017-842F-B8D6B2ADC19A@redhat.com> <73e48b3b4e835231a1c2a79613baf6bb01d3f6a3.camel@hammerspace.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.7 X-Spam-Status: No, score=-1.0 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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 15 Nov 2023 13:30:32 -0800 (PST) On 15 Nov 2023, at 12:16, Trond Myklebust wrote: > On Wed, 2023-11-15 at 08:04 -0500, Benjamin Coddington wrote: >> On 9 Nov 2023, at 12:25, Benjamin Coddington wrote: >> >>> On 9 Nov 2023, at 11:53, Trond Myklebust wrote: >>>> >>>> Hi Ben, >>>> >>>> Relying on the value of dreq->bytes_left is just not a good idea, >>>> given >>>> that the layoutget request could end up returning NFS4ERR_DELAY. >>>> >>>> How about something like the following patch? >>> >>> That looks promising!  I think ->bytes_left could get dropped after >>> this. >>> >>> I'll send it through some testing and report back, thanks! >> >> This definitely fixes it, sorry for the delay getting back. >> >> Fixes: 954998b60caa ("NFS: Fix error handling for O_DIRECT write >> scheduling") >> Reviewed-by: Benjamin Coddington >> Tested-by: Benjamin Coddington >> >> It creates some clear additional work to remove nfs_direct_req- >>> bytes_left >> (I don't think its needed anymore) and fixup the nfs_direct_req_class >> tracepoint, which could be a follow-up patch or get folded in. >> > > Thank you! I'll queue that patch up so it gets included in the next > bugfix pull request. Thank you for the fix. > I agree that we should get rid of the bytes_left field. We can queue > something up for that in the next merge window. I have it tested already with yours, I'll send it along. Ben