From nobody Tue Dec 16 05:37:44 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5831C4332F for ; Wed, 13 Dec 2023 13:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378970AbjLMNue (ORCPT ); Wed, 13 Dec 2023 08:50:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379265AbjLMNuX (ORCPT ); Wed, 13 Dec 2023 08:50:23 -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 DB310123 for ; Wed, 13 Dec 2023 05:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702475426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mwRJi2sCnG34wTz+6X85LZ5bO1xW/kuUkUV8gU/er0M=; b=GDKZcq/Ab4e3r6Bon3L+1dcaDDxJOKrj9c3FgI9WgIFapDGFJFIBIXX/zy3pKDBHd6dyF3 qwhzNlMSDPSeKFTxpT4acu0lvJ0leMem7o55t+G5JtHzgjYLxn/lzIoueabwFq40RtW8vx UFClue8rvMAcs7DxIggiiHe9ZsT8LSg= 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-325-cfUhRadEPFaaBvS2RUXciA-1; Wed, 13 Dec 2023 08:50:23 -0500 X-MC-Unique: cfUhRadEPFaaBvS2RUXciA-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 E4C068C46C2; Wed, 13 Dec 2023 13:50:22 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 278D72166B32; Wed, 13 Dec 2023 13:50:22 +0000 (UTC) From: David Howells To: Marc Dionne Cc: David Howells , linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/40] afs: Don't skip server addresses for which we didn't get an RTT reading Date: Wed, 13 Dec 2023 13:49:32 +0000 Message-ID: <20231213135003.367397-11-dhowells@redhat.com> In-Reply-To: <20231213135003.367397-1-dhowells@redhat.com> References: <20231213135003.367397-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" In the rotation algorithms for iterating over volume location servers and file servers, don't skip servers from which we got a valid response to a probe (either a reply DATA packet or an ABORT) even if we didn't manage to get an RTT reading. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org --- fs/afs/rotate.c | 2 +- fs/afs/vl_rotate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c index 59aed7a6dd11..d420f073300b 100644 --- a/fs/afs/rotate.c +++ b/fs/afs/rotate.c @@ -427,7 +427,7 @@ bool afs_select_fileserver(struct afs_operation *op) if (!test_bit(i, &op->untried) || !test_bit(AFS_SERVER_FL_RESPONDING, &s->flags)) continue; - if (s->probe.rtt < rtt) { + if (s->probe.rtt <=3D rtt) { op->index =3D i; rtt =3D s->probe.rtt; } diff --git a/fs/afs/vl_rotate.c b/fs/afs/vl_rotate.c index f8f255c966ae..6aaa2e4733ec 100644 --- a/fs/afs/vl_rotate.c +++ b/fs/afs/vl_rotate.c @@ -201,7 +201,7 @@ bool afs_select_vlserver(struct afs_vl_cursor *vc) if (!test_bit(i, &vc->untried) || !test_bit(AFS_VLSERVER_FL_RESPONDING, &s->flags)) continue; - if (s->probe.rtt < rtt) { + if (s->probe.rtt <=3D rtt) { vc->index =3D i; rtt =3D s->probe.rtt; }