Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3434047rdb; Thu, 16 Nov 2023 09:18:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3rJxskSe9xPQHoDd+IRXYu6GiG9AD0fJjJ3xGXFz4q7lk2HiMn4nHEGQTli5g3vGD0hPp X-Received: by 2002:a05:6808:219a:b0:3b2:dd7d:fc5e with SMTP id be26-20020a056808219a00b003b2dd7dfc5emr22477821oib.10.1700155117835; Thu, 16 Nov 2023 09:18:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700155117; cv=none; d=google.com; s=arc-20160816; b=fHs+EuTVH1PUOTzgqH928CVsQgP4vUdvHdzN/xIrwoI4kZ1i0Ng5mn8iAWLkw0FAxq dGGf6DVllOggpvfntrq5CNSifCDFy75u+I3e0MLUi0zPLuukfpnUHwVvJ0tYnpJFNZJC UamLKFrc+toySGhVY2DdM1xZSUOaZC7vg5qWpTGTeTUCtD0k83YIiEAQf7mLjrhVhiCI TVKuhec7hCoten3PTbfHDGoc2d21EHbybNcsPLYnfof3bzTrUVy8EjfSwgaXR5B1cpYd +aZIKXc7PjWRAMlykb/wvGYpxUsFdGk+A+mIB0qXL+P4WcpeknXcroJBl2ugmx1cLRJ4 mCpA== 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:to:from :dkim-signature; bh=6eaUN7akebxjqP47KvyhLwS4CX2CVpk5q8H7GHDgTpE=; fh=A3pMOUK00huGibGCZBFsLekFLVbB5hHGKjUNNKwO+5E=; b=uovsc02yIeYnB5qnnOnDPVSFBHFgyaUCdmuJUDVFwkLjK27G7ixtprSWfWreP9O+Ve 2H92+ucmplyf2EW9wcPldHhB4PddkBwwGIcKckLhCN6OdcyINBPTlSZAIOXsYRqvfSQR PzQ2vVp6ixGnvQlEihf6ndQdDuFqP92VGxd4Q3TmZuxRpLZSBvQNEGmDwbc/yBKQDQdV XGDtCF1DpkLq2yHvdmfb1Pw5PVC0vQ+zR6W5NHk7QCjzygJwXwTN8ruSWtuTMyR1sZ2g BLLYCq7ZDGvW1rN6xTi44p/ebdgePJzDJ9o4aIsh+PJiqZHj8rvGYn+wL1mU/d8dGX7t EaMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ch99/xPa"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b76-20020a63344f000000b005b9602a7ba3si12361363pga.475.2023.11.16.09.18.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 09:18:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ch99/xPa"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 81E2B80A4AFC; Thu, 16 Nov 2023 09:18:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229464AbjKPRSG (ORCPT + 99 others); Thu, 16 Nov 2023 12:18:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231289AbjKPRSD (ORCPT ); Thu, 16 Nov 2023 12:18:03 -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 0223B101 for ; Thu, 16 Nov 2023 09:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700155080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6eaUN7akebxjqP47KvyhLwS4CX2CVpk5q8H7GHDgTpE=; b=Ch99/xPaLDaqPvATR9vt/CBGAbaVezeocr7Ic8HIX8/2AAxY4HZL9bsTxcA12YN35ue7ru xAp7y/+zr4epzvrOKSlTuV0KURw8jFCYOkgTa4N9sf8ZLnsA9u4hI7bGBcBBPjjzBvZCL8 t6+W1joQoFyYqRQni9hGG+viJqhRORY= 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-646-dlmzS6DCPHaUqcuOFfPxeA-1; Thu, 16 Nov 2023 12:17:57 -0500 X-MC-Unique: dlmzS6DCPHaUqcuOFfPxeA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 9927C185A785 for ; Thu, 16 Nov 2023 17:17:57 +0000 (UTC) Received: from [100.85.132.103] (unknown [10.22.48.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 526B5492BFE for ; Thu, 16 Nov 2023 17:17:57 +0000 (UTC) From: Benjamin Coddington To: Linux NFS Mailing List Subject: Re: Blocklayoutdriver deadlock with knfsd Date: Thu, 16 Nov 2023 12:17:55 -0500 Message-ID: <3A3EABED-888C-40B1-9929-B4CCDB646BA0@redhat.com> In-Reply-To: <1CC82EC5-6120-4EE4-A7F0-019CF7BC762C@redhat.com> References: <1CC82EC5-6120-4EE4-A7F0-019CF7BC762C@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 16 Nov 2023 09:18:04 -0800 (PST) On 16 Nov 2023, at 12:11, Benjamin Coddington wrote: > I ran into this old problem again recently, last discussed here: > https://lore.kernel.org/linux-nfs/F738DB31-B527-4048-94A7-DBF00533F8C1@= redhat.com/#t > > Problem is that clients can easily issue enough WRITEs that end up in > > __break_lease > xfs_break_leased_layouts > ... > nfsd_vfs_write > ... > svc_process > svc_recv > nfsd > > .. so that all the knfsds are there, and nothing can process the > LAYOUTRETURN. > > I'm pretty sure we can make the linux client a bit smarter about it (I = saw > one LAYOUTGET and one conflicting WRITE in the same TCP segment, in tha= t > order). Actually, I can't imagine any block/SCSI/NVMe server implementation that would be fine with a client writing to the device at the same time the se= rver does, and so why shouldn't the client preemptively return the layout? Ben