linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>
To: Luis Chamberlain <mcgrof@kernel.org>,
	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
Subject: Re: [PATCH 2/5] drbd: use PAGE_SECTORS_SHIFT and PAGE_SECTORS
Date: Mon, 24 Apr 2023 10:26:30 +0200	[thread overview]
Message-ID: <42c89d18-b68f-a7d0-921a-6f45b54da356@linbit.com> (raw)
In-Reply-To: <20230421195807.2804512-3-mcgrof@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 <mcgrof@kernel.org>
> ---
>  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.boehmwalder@linbit.com>

-- 
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA —  Disaster Recovery — Software defined Storage


  reply	other threads:[~2023-04-24  8:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 19:58 [PATCH 0/5] block: simplify with PAGE_SECTORS_SHIFT Luis Chamberlain
2023-04-21 19:58 ` [PATCH 1/5] dm integrity: simplify by using PAGE_SECTORS_SHIFT Luis Chamberlain
2023-04-21 20:15   ` Matthew Wilcox
2023-04-21 19:58 ` [PATCH 2/5] drbd: use PAGE_SECTORS_SHIFT and PAGE_SECTORS Luis Chamberlain
2023-04-24  8:26   ` Christoph Böhmwalder [this message]
2023-04-21 19:58 ` [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS Luis Chamberlain
2023-04-21 20:14   ` Matthew Wilcox
2023-04-21 22:02     ` Luis Chamberlain
2023-04-21 22:24       ` Jens Axboe
2023-04-21 22:30         ` Luis Chamberlain
2023-04-21 22:36           ` Jens Axboe
2023-04-21 22:34       ` Dave Chinner
2023-04-24  5:55         ` Christoph Hellwig
2023-04-21 19:58 ` [PATCH 4/5] dm bufio: simplify by using PAGE_SECTORS_SHIFT Luis Chamberlain
2023-04-21 19:58 ` [PATCH 5/5] zram: use generic PAGE_SECTORS and PAGE_SECTORS_SHIFT Luis Chamberlain
2023-04-24  2:36   ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42c89d18-b68f-a7d0-921a-6f45b54da356@linbit.com \
    --to=christoph.boehmwalder@linbit.com \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=da.gomez@samsung.com \
    --cc=djwong@kernel.org \
    --cc=dm-devel@redhat.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=hare@suse.de \
    --cc=hch@infradead.org \
    --cc=kbusch@kernel.org \
    --cc=lars.ellenberg@linbit.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=minchan@kernel.org \
    --cc=p.raghav@samsung.com \
    --cc=patches@lists.linux.dev \
    --cc=philipp.reisner@linbit.com \
    --cc=senozhatsky@chromium.org \
    --cc=snitzer@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).