Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5289817rwr; Mon, 24 Apr 2023 01:37:44 -0700 (PDT) X-Google-Smtp-Source: AKy350ZA1hsDzgLGGorQ9Ma9ry7g6gtbRtscW+h5JI7a6zMvcaZgjgbjn5egw9lVqyRwUn8ObIIs X-Received: by 2002:a17:90b:4d88:b0:233:c301:32b3 with SMTP id oj8-20020a17090b4d8800b00233c30132b3mr13689531pjb.3.1682325464348; Mon, 24 Apr 2023 01:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682325464; cv=none; d=google.com; s=arc-20160816; b=0lR95OOH+0NX77tBC4cBtC7KuXiMNCq008okIPVpSk65WOwgDSjasKHvUZCYwn/49r GEPTeR+OvVojoQtw1M+bPxYJCKPvP3m6QsarFF79Io/Nq1E4J5BsPZpAuP6tPszsDR/P viV7GZ23PErdF1GvdjsOTmGKjQjV+lQiWnVV7vqq90BaiHUSQJ3HiZ/0tK15D5i54RCh +22p/+/Lu392vAf/JwO4ZtJuC83ttzoY62QCY0UvkAZftR/Q24q33K5RUiClx1r2eDfh KHFoHzOxA1greSucKyT3PIvfdMjeIheRYLXkDj/pECT/rSa+xbG3PCc9t97mxrMc8XSY Zotg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3pxlWKD7dnb+hgIonOTuPgqaiGVvQd+hXe0K6IdPi2M=; b=OV6g99zukOQvTjDE0RMaHfnspave1F6scKEn5+tNilk/G5x1PKqdhldqlafaFJaqXj YNbkw27BgSDdqm/qaYlF8OUPKQS4jb8MTaKcsw2PVnzl0urhtPkqj4cpBMcVb8sYvxQY R6qWSlMlyT8JAoRJENsMDWuWefDwYpOK3/zXuDS5v03J/o0usuVXWKwO9pi+yHo1Ib0c gOhCggFtUM6WYi31N2ziVQg4dpWNz7jh9jgVNooe73lZB2alsBKrYPxg1+MMzzYZCh93 0f0UBdlaF/MxjFf2jzKyzSatt/dc3GOe5lYkejPxcwyZ5hN9/EL7Yypn28HLhYOm+uGB GaAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linbit-com.20221208.gappssmtp.com header.s=20221208 header.b=BCLvweSQ; 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 a8-20020a17090a688800b002465d98f18csi13494125pjd.170.2023.04.24.01.37.33; Mon, 24 Apr 2023 01:37:44 -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.20221208.gappssmtp.com header.s=20221208 header.b=BCLvweSQ; 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 S230467AbjDXI0j (ORCPT + 99 others); Mon, 24 Apr 2023 04:26:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbjDXI0g (ORCPT ); Mon, 24 Apr 2023 04:26:36 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8371410D2 for ; Mon, 24 Apr 2023 01:26:33 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f173af665fso25695555e9.3 for ; Mon, 24 Apr 2023 01:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linbit-com.20221208.gappssmtp.com; s=20221208; t=1682324792; x=1684916792; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3pxlWKD7dnb+hgIonOTuPgqaiGVvQd+hXe0K6IdPi2M=; b=BCLvweSQah01sJW9SBAyC5wgM9gcCgmoD6eVt1pixm6TIMPKSMsfDJ/G6pQ7WifY+a jCWSatlOFJoGBGRyqNjpnC83+YZxWwidqcfJV7qrZVFpoOQQ5qGdcpNUfD/1uI304Bsr n5t0aKbFfDOlYu2sfU/KiJsKG+tbC5Q3pej1LUOiQjmwv12srCYdM4fwvJqfC1vIGgHG i7xM2mHs1udxBgFRdzJGUIySnuCvM4rCCc4KxRtFlArnjXACALMboZpw/c8XanndS9Ts WTUnWIGWHkbm7Rk6Wg/mlO7SJDa+qk0PwimjElI9r8oOeFo6sLYUJveYcdOozE2aiQA6 piSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682324792; x=1684916792; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3pxlWKD7dnb+hgIonOTuPgqaiGVvQd+hXe0K6IdPi2M=; b=bh37d5IqKXpK2jd4LOB/MMNk2/rOYj+Tj4xxfeNJVrtP9qmzXq2jQ4jKNybUO/xV5Q VwEM3Y5yyhymxGPHXWZzUjU+iiYGzFh0+oO0Tq89a7E7A4UNlD9lsO3fizSLgL5cMOxN AfRbD1jMlimZiF05UAG0kAhGRVjJ0Dd+w82VzrskIL1YdcZ1g0zy/KsPLN1i+xLvrYvb cFq73ylt6Z9w1My7LTBbqP0LjziaLQHa6BAWU3/o2grrWmAstFOTHhBVALvPeRq1ZU3M 6gGqA7PTZfiX3O7gGS67a5B0P9L9kmNrYJ0lBliACJtAiIYW0wk8MXUcl3WHX0iRuvUn IVbQ== X-Gm-Message-State: AAQBX9dRDcuOW9MFG2Obzyq0GpBsbX1nU3BOnxE7ZAtPzp0MNPkr5wlv s0cXI7orNnRmLTyp9NnK9fdwNA== X-Received: by 2002:a05:600c:259:b0:3f1:662a:93d0 with SMTP id 25-20020a05600c025900b003f1662a93d0mr7829493wmj.15.1682324791970; Mon, 24 Apr 2023 01:26:31 -0700 (PDT) Received: from [192.168.178.55] (h082218028181.host.wavenet.at. [82.218.28.181]) by smtp.gmail.com with ESMTPSA id l20-20020a05600c16d400b003f19bca8f03sm4904838wmn.43.2023.04.24.01.26.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Apr 2023 01:26:31 -0700 (PDT) Message-ID: <42c89d18-b68f-a7d0-921a-6f45b54da356@linbit.com> Date: Mon, 24 Apr 2023 10:26:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 2/5] drbd: use PAGE_SECTORS_SHIFT and PAGE_SECTORS To: Luis Chamberlain , axboe@kernel.dk, agk@redhat.com, snitzer@kernel.org, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, hch@infradead.org, djwong@kernel.org, minchan@kernel.org, senozhatsky@chromium.org Cc: patches@lists.linux.dev, linux-block@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, willy@infradead.org, hare@suse.de, p.raghav@samsung.com, da.gomez@samsung.com, kbusch@kernel.org References: <20230421195807.2804512-1-mcgrof@kernel.org> <20230421195807.2804512-3-mcgrof@kernel.org> Content-Language: en-US From: =?UTF-8?Q?Christoph_B=c3=b6hmwalder?= In-Reply-To: <20230421195807.2804512-3-mcgrof@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 21.04.23 um 21:58 schrieb Luis Chamberlain: > Replace common constants with generic versions. > This produces no functional changes. > > Signed-off-by: Luis Chamberlain > --- > drivers/block/drbd/drbd_bitmap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c > index 6ac8c54b44c7..b556e6634f13 100644 > --- a/drivers/block/drbd/drbd_bitmap.c > +++ b/drivers/block/drbd/drbd_bitmap.c > @@ -1000,7 +1000,7 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho > unsigned int len; > > first_bm_sect = device->ldev->md.md_offset + device->ldev->md.bm_offset; > - on_disk_sector = first_bm_sect + (((sector_t)page_nr) << (PAGE_SHIFT-SECTOR_SHIFT)); > + on_disk_sector = first_bm_sect + (((sector_t)page_nr) << PAGE_SECTORS_SHIFT); > > /* this might happen with very small > * flexible external meta data device, > @@ -1008,7 +1008,7 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho > last_bm_sect = drbd_md_last_bitmap_sector(device->ldev); > if (first_bm_sect <= on_disk_sector && last_bm_sect >= on_disk_sector) { > sector_t len_sect = last_bm_sect - on_disk_sector + 1; > - if (len_sect < PAGE_SIZE/SECTOR_SIZE) > + if (len_sect < PAGE_SECTORS) > len = (unsigned int)len_sect*SECTOR_SIZE; > else > len = PAGE_SIZE; Acked-by: Christoph Böhmwalder -- Christoph Böhmwalder LINBIT | Keeping the Digital World Running DRBD HA — Disaster Recovery — Software defined Storage