From: Jonathan Derrick <jonathan.derrick@linux.dev>
To: Song Liu <song@kernel.org>
Cc: linux-raid@vger.kernel.org,
Dan Carpenter <dan.carpenter@linaro.org>,
Sushma Kalakota <sushma.kalakota@intel.com>,
"Michael Kropaczek (CW)" <Michael.Kropaczek@solidigm.com>,
Sushma Kalakota <sushma.kalakota@solidigm.com>
Subject: Re: [PATCH] md: Fix bitmap offset type in sb writer
Date: Wed, 26 Apr 2023 13:08:00 -0600 [thread overview]
Message-ID: <7c1ff2cb-22da-3a44-c1c9-27bb400bcc80@linux.dev> (raw)
In-Reply-To: <CAPhsuW5LMzsus-nvNCj2Fy71cTW04rEN=bwcynqDHc7zrEYxCg@mail.gmail.com>
Hi Song,
On 4/26/2023 11:58 AM, Song Liu wrote:
> Hi Jonathan,
>
> On Tue, Apr 25, 2023 at 8:44 PM Song Liu <song@kernel.org> wrote:
>>
>> On Mon, Apr 24, 2023 at 6:16 PM Jonathan Derrick
>> <jonathan.derrick@linux.dev> wrote:
>>>
>>> Bitmap offset is allowed to be negative, indicating that bitmap precedes
>>> metadata. Change the type back from sector_t to loff_t to satisfy
>>> conditionals and calculations.
>
> This actually breaks the following tests from mdadm:
>
> 05r1-add-internalbitmap-v1a
> 05r1-internalbitmap-v1a
> 05r1-remove-internalbitmap-v1a
>
> Please look into these.
>
I no longer work for Solidigm and don't have access to equipment that
can test this. I'm CCing Sushma and Michael who should be able to test
and report back.
Thanks,
Jon
> Thanks,
> Song
>
>>>
>>> Signed-off-by: Jonathan Derrick <jonathan.derrick@linux.dev>
>>
>> I added the following to the patch and applied it to md-next.
>>
>> Thanks,
>> Song
>>
>> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
>> Fixes: 10172f200b67 ("md: Fix types in sb writer")
>>
>>> ---
>>> drivers/md/md-bitmap.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
>>> index 920bb68156d2..29ae7f7015e4 100644
>>> --- a/drivers/md/md-bitmap.c
>>> +++ b/drivers/md/md-bitmap.c
>>> @@ -237,8 +237,8 @@ static int __write_sb_page(struct md_rdev *rdev, struct bitmap *bitmap,
>>> struct block_device *bdev;
>>> struct mddev *mddev = bitmap->mddev;
>>> struct bitmap_storage *store = &bitmap->storage;
>>> - sector_t offset = mddev->bitmap_info.offset;
>>> - sector_t ps, sboff, doff;
>>> + loff_t sboff, offset = mddev->bitmap_info.offset;
>>> + sector_t ps, doff;
>>> unsigned int size = PAGE_SIZE;
>>> unsigned int opt_size = PAGE_SIZE;
>>>
>>> --
>>> 2.40.0
>>>
next prev parent reply other threads:[~2023-04-26 19:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 1:14 [PATCH] md: Fix bitmap offset type in sb writer Jonathan Derrick
2023-04-26 3:44 ` Song Liu
2023-04-26 17:58 ` Song Liu
2023-04-26 19:08 ` Jonathan Derrick [this message]
2023-04-27 9:35 ` Yu Kuai
2023-04-27 17:45 ` Song Liu
2023-04-28 2:04 ` Yu Kuai
2023-04-28 7:23 ` Yu Kuai
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=7c1ff2cb-22da-3a44-c1c9-27bb400bcc80@linux.dev \
--to=jonathan.derrick@linux.dev \
--cc=Michael.Kropaczek@solidigm.com \
--cc=dan.carpenter@linaro.org \
--cc=linux-raid@vger.kernel.org \
--cc=song@kernel.org \
--cc=sushma.kalakota@intel.com \
--cc=sushma.kalakota@solidigm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.