From: Neil Brown <neilb@suse.de>
To: Andre Noll <maan@systemlinux.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH 1/5] md: Make update_size() take the number of sectors.
Date: Fri, 11 Jul 2008 20:56:41 +1000 [thread overview]
Message-ID: <18551.15465.61079.450222@notabene.brown> (raw)
In-Reply-To: message from Andre Noll on Thursday July 10
On Thursday July 10, maan@systemlinux.org wrote:
> @@ -4588,7 +4588,7 @@ static int update_array_info(mddev_t *mddev, mdu_array_info_t *info)
> return mddev->pers->reconfig(mddev, info->layout, -1);
> }
> if (info->size >= 0 && mddev->size != info->size)
> - rv = update_size(mddev, info->size);
> + rv = update_size(mddev, info->size * 2);
>
> if (mddev->raid_disks != info->raid_disks)
> rv = update_raid_disks(mddev, info->raid_disks);
I've made this
rv = update_size(mddev, (sector_t)info->size * 2);
as info->size is an int and without the cast, a size of 2TB
(2^31 K) would become 0.
Otherwise, it's good. Thanks.
NeilBrown
next prev parent reply other threads:[~2008-07-11 10:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 9:15 [PATCH 0/5] md: sector_t conversions Andre Noll
2008-07-10 9:15 ` [PATCH 1/5] md: Make update_size() take the number of sectors Andre Noll
2008-07-11 10:56 ` Neil Brown [this message]
2008-07-10 9:15 ` [PATCH 2/5] md: Replace calc_dev_size() by calc_num_sectors() Andre Noll
2008-07-10 9:15 ` [PATCH 3/5] md: Make calc_dev_sboffset() return a sector count Andre Noll
2008-07-11 11:04 ` Neil Brown
2008-07-10 9:15 ` [PATCH 4/5] md: Turn rdev->sb_offset into a sector-based quantity Andre Noll
2008-07-11 11:15 ` Neil Brown
2008-07-17 9:40 ` Andre Noll
2008-07-21 10:38 ` Neil Brown
2008-07-10 9:15 ` [PATCH 5/5] md: Remove some unused macros Andre Noll
2008-07-11 12:18 ` [PATCH 0/5] md: sector_t conversions Neil Brown
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=18551.15465.61079.450222@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=maan@systemlinux.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).