From: Shaohua Li <shli@kernel.org>
To: Jason Yan <yanaijie@huawei.com>
Cc: linux-raid@vger.kernel.org, miaoxie@huawei.com, zhaohongjiang@huawei.com
Subject: Re: [PATCH] md: fix super_offset endianness in super_1_rdev_size_change
Date: Thu, 9 Mar 2017 20:47:27 -0800 [thread overview]
Message-ID: <20170310044727.lfwu4qjmgl5bj622@kernel.org> (raw)
In-Reply-To: <1489116443-16195-1-git-send-email-yanaijie@huawei.com>
On Fri, Mar 10, 2017 at 11:27:23AM +0800, Jason Yan wrote:
> The sb->super_offset should be big-endian, but the rdev->sb_start is in
> host byte order, so fix this by adding cpu_to_le64.
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
thanks, applied the two patches.
> ---
> drivers/md/md.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 548d1b8..b6516f8 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -1887,7 +1887,7 @@ super_1_rdev_size_change(struct md_rdev *rdev, sector_t num_sectors)
> }
> sb = page_address(rdev->sb_page);
> sb->data_size = cpu_to_le64(num_sectors);
> - sb->super_offset = rdev->sb_start;
> + sb->super_offset = cpu_to_le64(rdev->sb_start);
> sb->sb_csum = calc_sb_1_csum(sb);
> do {
> md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size,
> --
> 2.5.0
>
prev parent reply other threads:[~2017-03-10 4:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 3:27 [PATCH] md: fix super_offset endianness in super_1_rdev_size_change Jason Yan
2017-03-10 4:47 ` Shaohua Li [this message]
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=20170310044727.lfwu4qjmgl5bj622@kernel.org \
--to=shli@kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=yanaijie@huawei.com \
--cc=zhaohongjiang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox