Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1925162rwl; Thu, 30 Mar 2023 03:34:55 -0700 (PDT) X-Google-Smtp-Source: AKy350bCbUGtOhxTrr1dO4BS7ttSwpbkUr9Yej/tHUdpvUScAFdDXzFO5VNmX1hP9TCdzya+ShnZ X-Received: by 2002:a05:6a00:194e:b0:62a:5ae:3012 with SMTP id s14-20020a056a00194e00b0062a05ae3012mr2055513pfk.1.1680172494829; Thu, 30 Mar 2023 03:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680172494; cv=none; d=google.com; s=arc-20160816; b=FqMbWrBDD4YKbzL88cTyPR1GvZyEmrEyCf3qE2BYCYYdncnz2Z8/VvFb223rrMJfH1 ZJW63BbZsIdnWKzHHYttR3wSho1CBvqp9BU06vHzW6GZvWF45JgSoux4Nyp4mJRWdSbA oxBJz6KQzpafsK1BKQnoXkRamIw7QGY+bEm/C6bPSaNL41mHmcwBvq2Qar3qOgHIXdpZ w0NnPmmh2ZFz3oxfTLdMdkhV2kEeT4klW+7WuAKmPaXoRWGsg1ZKJYMgupovlFm3l81e oR43no/wqeos9g2PNBxeOwC5ei+FivEEv8FuheGehrEUKuLnLcsFqiMxQlHoMWh1U9po 3wFA== 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=8tFot2qeZ2g5bJSVqE02JTKqWWEEsYCP5AgrPPpbM1g=; b=VDoDWnJ4eZwnXH4qybMi3kT1UY9EecuB9C58AfpzxJu2cxfxWEmtgCU9prlTu9PNzX E+6WgXzM/aanSPgcY5kvX6/hw9kLxv/zId9JNnTRW9dEMLqlPkeKhby5Kzw/uZz88ZY9 taLA4zMOnL2EZEq6Z5gofqvV71ft8MES38RgMwoj6wMLk4780SKrRoFXnn9RPv+XCGRz 5+09pPjK3tTbAAn7aFYyMAU7SeSC3R9XVXE+GluT9hTZANWJmuyMZHDTZ/uAZwMiRtoG xCzZFqZz8qsUVh43wuiIpZG8eCGi2fCySN86/1kqBA2bl75pWkFUXCirpRdOTs1fA1m3 1NtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linbit-com.20210112.gappssmtp.com header.s=20210112 header.b=Kr79JUVm; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a631142000000b0050be5b718ebsi33049188pgr.272.2023.03.30.03.34.40; Thu, 30 Mar 2023 03:34:54 -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=@linbit-com.20210112.gappssmtp.com header.s=20210112 header.b=Kr79JUVm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231361AbjC3K2M (ORCPT + 99 others); Thu, 30 Mar 2023 06:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbjC3K16 (ORCPT ); Thu, 30 Mar 2023 06:27:58 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 981658A47 for ; Thu, 30 Mar 2023 03:27:53 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id y14so18545001wrq.4 for ; Thu, 30 Mar 2023 03:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linbit-com.20210112.gappssmtp.com; s=20210112; t=1680172072; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8tFot2qeZ2g5bJSVqE02JTKqWWEEsYCP5AgrPPpbM1g=; b=Kr79JUVmumwV3+sEie0htPM48raEk+XVN3Uigb4cPgz/Cwmmf2oedq9OELQ6vyXtK8 Dm9nnTEzKOh0DsIg7z6KNN7AmuRWpDYSyJEKipM0uIJXOJTyxPTHftT9AH93utfGowMI 6h+iHcfpohSBCDRVGzhWGQuNspw9LqCqebu19K9R6pxGDipKf5Nzir9Beq20sXWa0JqN xhuOQQVKRMX0leG+Trmm1hKWS/udYwoVtsuW/Ktl1lOHJnBKqXFv+y+vynPabLSsMar1 bVMA8Z4oIwh9uLBzrCN+7RlswnX5LYLW59Kbl14Nh56ZvwcQsBkVMI32l4JwDsQz1jwY Qcbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680172072; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8tFot2qeZ2g5bJSVqE02JTKqWWEEsYCP5AgrPPpbM1g=; b=T876V9vOz8zLKCMohiZA0bZzgX53hov5shDXNsC45EOOXmgEjJzlcAwC82bSqvMXxr 6oU30ZciFuaM57tDN0JJ+1JuOate9OjBMusAv8d6w5Z+X6x930vhT7pZtOzaAgi+XEGA xmVw01DOun2xcbNhT4n7pNV25yaKtUYvjVNlV/g7L9K3CIEDJcBfwXPLF5fGQdLXxbx4 2qQEGa0JfzlaIvMf0d1TPM7vZpCb5eTy+ggdAyLnQlGHfSlFfit0jqCkvDNRR25RLyQJ MUPpKp5mgmeeTSo2KM03kW7eMl2nW6euJf1Fxt1MARt4EZWaJ8NfqbNhd/9KqMh5xs4n AIyg== X-Gm-Message-State: AAQBX9c1SGeuRLo/3TvbuotkFNanpY64KhFeUkOYwIxDM362PAJuUbQe fMattd1Nhn7VW/0OOLfKB5BrVw== X-Received: by 2002:a5d:4dca:0:b0:2ce:9fb8:b560 with SMTP id f10-20020a5d4dca000000b002ce9fb8b560mr18901769wru.8.1680172072026; Thu, 30 Mar 2023 03:27:52 -0700 (PDT) Received: from localhost.localdomain (h082218028181.host.wavenet.at. [82.218.28.181]) by smtp.gmail.com with ESMTPSA id s11-20020adff80b000000b002d6f285c0a2sm26352514wrp.42.2023.03.30.03.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 03:27:51 -0700 (PDT) From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= To: Jens Axboe Cc: drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, Lars Ellenberg , Philipp Reisner , linux-block@vger.kernel.org, =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= Subject: [PATCH v3 5/7] drbd: drbd_uuid_compare: pass a peer_device Date: Thu, 30 Mar 2023 12:27:42 +0200 Message-Id: <20230330102744.2128122-6-christoph.boehmwalder@linbit.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230330102744.2128122-1-christoph.boehmwalder@linbit.com> References: <20230330102744.2128122-1-christoph.boehmwalder@linbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Signed-off-by: Christoph Böhmwalder --- drivers/block/drbd/drbd_receiver.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index c6f93a9087b1..e352880c70b5 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -3226,10 +3226,11 @@ static void drbd_uuid_dump(struct drbd_device *device, char *text, u64 *uuid, -1096 requires proto 96 */ -static int drbd_uuid_compare(struct drbd_device *const device, enum drbd_role const peer_role, int *rule_nr) __must_hold(local) +static int drbd_uuid_compare(struct drbd_peer_device *const peer_device, + enum drbd_role const peer_role, int *rule_nr) __must_hold(local) { - struct drbd_peer_device *const peer_device = first_peer_device(device); - struct drbd_connection *const connection = peer_device ? peer_device->connection : NULL; + struct drbd_connection *const connection = peer_device->connection; + struct drbd_device *device = peer_device->device; u64 self, peer; int i, j; @@ -3465,7 +3466,7 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_peer_device *peer_device, drbd_uuid_dump(device, "peer", device->p_uuid, device->p_uuid[UI_SIZE], device->p_uuid[UI_FLAGS]); - hg = drbd_uuid_compare(device, peer_role, &rule_nr); + hg = drbd_uuid_compare(peer_device, peer_role, &rule_nr); spin_unlock_irq(&device->ldev->md.uuid_lock); drbd_info(device, "uuid_compare()=%d by rule %d\n", hg, rule_nr); -- 2.39.2