Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3253118rwd; Fri, 16 Jun 2023 14:45:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7WlX4wXV8fzglOuIpsD6s4Wc20f7hsctnjc6SO3D/Ae2V68at1wzN4JO/H0M9iMbgh5T6o X-Received: by 2002:a05:6a21:788a:b0:117:51fe:9b4c with SMTP id bf10-20020a056a21788a00b0011751fe9b4cmr3656016pzc.7.1686951911252; Fri, 16 Jun 2023 14:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686951911; cv=none; d=google.com; s=arc-20160816; b=eimkAKVvBOFds4fEhSiBsVEQvGiAwIgnr9NyyrlEOLP4KmaFYARyVkYOVgkcZsDN62 Vlut1Ue4bGufX6wsZnbd7kskRZO88vPBhcJaLmYiU0VMA3vo6ErUBuqdverTHEDUOGCg /ApEvUwbVtLNhY62Pqft07uC3jfgoKFVPbBP2uZHBoRGgfH3M131v3bkm5CLP5FHNVSg oyAXUxCLvxo4OOYUewEBDbvAIHPvHM85Evrsj2xocMPjuEpbNnRuujTAecFdGcytwSPl PFg0bBHQiU4XXnnq9SrvsYkmRzGEwG3JV/Pq1JuqL5v+KrbjEs3vy2HuBQNiIDdnpNBN 2wpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:from:organization:dkim-signature; bh=zJIOldJuy+fu1YXH3vSoQYSg40ebqezMIIE6YitueZk=; b=nSdLtwlgHyPnZpXLXfJIFc3xkQpXT06X3/GkBMRyuoJwQY+fsV++pRB2X6IOQXDBIX tz5QphhSwZZs5155CzJrlQav08tRoS5n2XeCqYJy4BdwlRFJnC7jVrRM9J7g0uyDeCnr JmIbPLhCK931VZeIjqXhARKdd2k+wJELHkokbLDsGCvbKr6atCpYKet+Q8u7e2CbIbsJ 0fySRs0NgZdgozVlxxTpNH4huc6LOjVfIRtpl5FnXEa95piIz3bIXa6USvDDa6hU7024 1/3YQBVL4DIP+3qbEx4CmQFyUwJTcijsV++dJeuFEHxAhktX/1CyY9dHCW6seH9V8U7I dl9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cf4VYG2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 b18-20020a6567d2000000b005533c53f542si2822003pgs.763.2023.06.16.14.44.57; Fri, 16 Jun 2023 14:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=Cf4VYG2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229852AbjFPVke (ORCPT + 99 others); Fri, 16 Jun 2023 17:40:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbjFPVkc (ORCPT ); Fri, 16 Jun 2023 17:40:32 -0400 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 0FFA530DF for ; Fri, 16 Jun 2023 14:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686951583; 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; bh=zJIOldJuy+fu1YXH3vSoQYSg40ebqezMIIE6YitueZk=; b=Cf4VYG2TZCuJ1x0p1conmy/QdLPAffsvWqZJEGFlAb3njHP2u9mwVO/V2Jf+2qGivdyTLh gYX5UxvbuFUk49He/zwQgw+ch/ltDcO3vNLmZ1FrWm1NY+L2uB6oMJrto/KEfvaadMeQEW xLRo3/5ghK6u4th9Q9bXR9u4fE+SxVU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-295-5SsXz7YIN9K9CA5JBJ3zRQ-1; Fri, 16 Jun 2023 17:39:41 -0400 X-MC-Unique: 5SsXz7YIN9K9CA5JBJ3zRQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6A4F61C07266; Fri, 16 Jun 2023 21:39:41 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E283175AE; Fri, 16 Jun 2023 21:39:40 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells To: torvalds@linux-foundation.org cc: dhowells@redhat.com, Marc Dionne , linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] afs: Fix vlserver probe RTT handling MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <697563.1686951579.1@warthog.procyon.org.uk> Date: Fri, 16 Jun 2023 22:39:39 +0100 Message-ID: <697564.1686951579@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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_NONE, SPF_HELO_NONE,SPF_NONE,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-kernel@vger.kernel.org Hi Linus, Could you apply this, please? Thanks, David --- In the same spirit as commit ca57f02295f1 ("afs: Fix fileserver probe RTT handling"), don't rule out using a vlserver just because there haven't been enough packets yet to calculate a real rtt. Always set the server's probe rtt from the estimate provided by rxrpc_kernel_get_srtt, which is capped at 1 second. This could lead to EDESTADDRREQ errors when accessing a cell for the first time, even though the vl servers are known and have responded to a probe. Fixes: 1d4adfaf6574 ("rxrpc: Make rxrpc_kernel_get_srtt() indicate validity") Signed-off-by: Marc Dionne Signed-off-by: David Howells cc: linux-afs@lists.infradead.org Link: http://lists.infradead.org/pipermail/linux-afs/2023-June/006746.html --- fs/afs/vl_probe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/afs/vl_probe.c b/fs/afs/vl_probe.c index d1c7068b4346..58452b86e672 100644 --- a/fs/afs/vl_probe.c +++ b/fs/afs/vl_probe.c @@ -115,8 +115,8 @@ void afs_vlserver_probe_result(struct afs_call *call) } } - if (rxrpc_kernel_get_srtt(call->net->socket, call->rxcall, &rtt_us) && - rtt_us < server->probe.rtt) { + rxrpc_kernel_get_srtt(call->net->socket, call->rxcall, &rtt_us); + if (rtt_us < server->probe.rtt) { server->probe.rtt = rtt_us; server->rtt = rtt_us; alist->preferred = index;