Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2108038iof; Tue, 7 Jun 2022 20:00:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWpzYgOphqwcnBJaewbZRyHgDDjFsZlwFNxEnqqXTqj4FcpGq2fX3Uh1T4EOn7927D6VIH X-Received: by 2002:a17:902:d584:b0:167:6ab9:b094 with SMTP id k4-20020a170902d58400b001676ab9b094mr18568338plh.16.1654657241322; Tue, 07 Jun 2022 20:00:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654657241; cv=none; d=google.com; s=arc-20160816; b=xzMvUqzHPyfU9Cjb5+GWrb8MTQay/zSr5QC8T2oJI13Mp1vMzjpCkfxKqXwDjQNcqB Znr8VqH/0UwQR+A8ZZ+foeJ6yKP9zqhE369UseJGuhqcXMrxmbIuTiYPcP5ANuwkP6sF zXDmeou+vfIQdSz+tiKo3TxTkzcd7c+nEssH5VaGIlmW1ZGHAiVfnOWASR5ARqe1bOqO ptZX0Y9ep/GYmByyvgUXWwpEPrpa97FQ0wG5IQPic0Ef0Bn4kEuMbAd/iWAfObS04iTW Qad/rbqPEmuS9mYFri+1wGp3dWP1MhB1dXtaYM2gbnamek2hru4iL9J3fLvqS6yZ9K8d YHIA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oujFG/BJbs3rcOk6uLLr6PHh9r1XwWHVL2BBqsIjW24=; b=z8j6PVa9SyFk+c+pWRDM1KWyQW5T14+NbsqNeS1Bs2LjunSxaYcjY4MMcSnlme5QxG zHrhK3xQLq1VeSFHOpI3dV295goTZq+8gYj+JqDENesnosgYs/cuKMBkVe2X5Cja0OMT rAPBGYq2kH9eUUnzWdaRIylworkIzk49RBr4WdSE5SLE89hnmY+ulMvpbhdZVLf0UL+I 3B+hMHFErfKqRdIEhXhn2qJcfbqsy/621BIGy8iNsqUGs6VzPZ6mEH0lmDi8eDtZ7eLe x34KxAXszf4SD52rSS0sYKURlLfG7Iod/2Ineq1ErSbrE2w2yzVjoYRFfB8Bd9CA9tZE jmng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EYcN53Mh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y64-20020a638a43000000b003fe25570ee0si1896227pgd.849.2022.06.07.20.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:00:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EYcN53Mh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D6E053897BC; Tue, 7 Jun 2022 18:59:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384374AbiFGWgA (ORCPT + 99 others); Tue, 7 Jun 2022 18:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378277AbiFGVX3 (ORCPT ); Tue, 7 Jun 2022 17:23:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7052A2258A2; Tue, 7 Jun 2022 12:00:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5E9526159D; Tue, 7 Jun 2022 19:00:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E4A7C385A2; Tue, 7 Jun 2022 19:00:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628412; bh=uG365FWOJXLP9dZ6rGocKIu+oCmCh1t20MUDojwND2Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EYcN53MhpXDti5ebZxza9tZ2G+dfUZaFRQXcpKaE/VoQMe6B3FLg7oaMGa//qaHmj CWh9NyFQsyORs+lcvYgRwUNooj7uZ6eXHRVAga+rA1J4Xv97J4kUuko6GXj4cN7Ur4 jlQPm/1Wol/9kp9O1gwAvbRGFAVZALjLeIBgHgtU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= , Jens Axboe , Sasha Levin Subject: [PATCH 5.18 319/879] drbd: use bdev_alignment_offset instead of queue_alignment_offset Date: Tue, 7 Jun 2022 18:57:17 +0200 Message-Id: <20220607165012.111296099@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig [ Upstream commit c6f23b1a05441a26f765e59dd95e8ba7354f9388 ] The bdev version does the right thing for partitions, so use that. Fixes: 9104d31a759f ("drbd: introduce WRITE_SAME support") Signed-off-by: Christoph Hellwig Acked-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20220415045258.199825-7-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/block/drbd/drbd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index c39b04bda261..7b501c8d5992 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -939,7 +939,7 @@ int drbd_send_sizes(struct drbd_peer_device *peer_device, int trigger_reply, enu p->qlim->logical_block_size = cpu_to_be32(bdev_logical_block_size(bdev)); p->qlim->alignment_offset = - cpu_to_be32(queue_alignment_offset(q)); + cpu_to_be32(bdev_alignment_offset(bdev)); p->qlim->io_min = cpu_to_be32(bdev_io_min(bdev)); p->qlim->io_opt = cpu_to_be32(bdev_io_opt(bdev)); p->qlim->discard_enabled = blk_queue_discard(q); -- 2.35.1