From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
Simon Kirby <sim@netnation.com>
Subject: [PATCH] md: Fix a bug that recently crept into md/linear
Date: Tue, 1 Aug 2006 14:08:47 +1000 [thread overview]
Message-ID: <1060801040847.11976@suse.de> (raw)
In-Reply-To: 20060801140742.11940.patches@notabene
This patch fixed a bug in 2.6.18-rc3 It would be good if it can get
into -final.
Thanks,
NeilBrown
### Comments for Changeset
A recent patch that allowed linear arrays to be reconfigured on-line
allowed in a bug which results in divide by zero - not all
mddev->array_size were converted to conf->array_size.
This patch finished the conversion and fixed the bug.
The offending patch was commit 7c7546ccf6463edbeee8d9aac6de7be1cd80d08a.
Thanks to Simon Kirby <sim@netnation.com> for the bug report.
Cc: Simon Kirby <sim@netnation.com>
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./drivers/md/linear.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff .prev/drivers/md/linear.c ./drivers/md/linear.c
--- .prev/drivers/md/linear.c 2006-08-01 11:06:15.000000000 +1000
+++ ./drivers/md/linear.c 2006-08-01 11:06:23.000000000 +1000
@@ -162,7 +162,7 @@ static linear_conf_t *linear_conf(mddev_
goto out;
}
- min_spacing = mddev->array_size;
+ min_spacing = conf->array_size;
sector_div(min_spacing, PAGE_SIZE/sizeof(struct dev_info *));
/* min_spacing is the minimum spacing that will fit the hash
@@ -171,7 +171,7 @@ static linear_conf_t *linear_conf(mddev_
* that is larger than min_spacing as use the size of that as
* the actual spacing
*/
- conf->hash_spacing = mddev->array_size;
+ conf->hash_spacing = conf->array_size;
for (i=0; i < cnt-1 ; i++) {
sector_t sz = 0;
int j;
@@ -228,7 +228,7 @@ static linear_conf_t *linear_conf(mddev_
curr_offset = 0;
i = 0;
for (curr_offset = 0;
- curr_offset < mddev->array_size;
+ curr_offset < conf->array_size;
curr_offset += conf->hash_spacing) {
while (i < mddev->raid_disks-1 &&
WARNING: multiple messages have this Message-ID (diff)
From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Simon Kirby <sim@netnation.com>
Subject: [PATCH] md: Fix a bug that recently crept into md/linear
Date: Tue, 1 Aug 2006 14:08:47 +1000 [thread overview]
Message-ID: <1060801040847.11976@suse.de> (raw)
In-Reply-To: 20060801140742.11940.patches@notabene
This patch fixed a bug in 2.6.18-rc3 It would be good if it can get
into -final.
Thanks,
NeilBrown
### Comments for Changeset
A recent patch that allowed linear arrays to be reconfigured on-line
allowed in a bug which results in divide by zero - not all
mddev->array_size were converted to conf->array_size.
This patch finished the conversion and fixed the bug.
The offending patch was commit 7c7546ccf6463edbeee8d9aac6de7be1cd80d08a.
Thanks to Simon Kirby <sim@netnation.com> for the bug report.
Cc: Simon Kirby <sim@netnation.com>
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./drivers/md/linear.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff .prev/drivers/md/linear.c ./drivers/md/linear.c
--- .prev/drivers/md/linear.c 2006-08-01 11:06:15.000000000 +1000
+++ ./drivers/md/linear.c 2006-08-01 11:06:23.000000000 +1000
@@ -162,7 +162,7 @@ static linear_conf_t *linear_conf(mddev_
goto out;
}
- min_spacing = mddev->array_size;
+ min_spacing = conf->array_size;
sector_div(min_spacing, PAGE_SIZE/sizeof(struct dev_info *));
/* min_spacing is the minimum spacing that will fit the hash
@@ -171,7 +171,7 @@ static linear_conf_t *linear_conf(mddev_
* that is larger than min_spacing as use the size of that as
* the actual spacing
*/
- conf->hash_spacing = mddev->array_size;
+ conf->hash_spacing = conf->array_size;
for (i=0; i < cnt-1 ; i++) {
sector_t sz = 0;
int j;
@@ -228,7 +228,7 @@ static linear_conf_t *linear_conf(mddev_
curr_offset = 0;
i = 0;
for (curr_offset = 0;
- curr_offset < mddev->array_size;
+ curr_offset < conf->array_size;
curr_offset += conf->hash_spacing) {
while (i < mddev->raid_disks-1 &&
next parent reply other threads:[~2006-08-01 4:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060801140742.11940.patches@notabene>
2006-08-01 4:08 ` NeilBrown [this message]
2006-08-01 4:08 ` [PATCH] md: Fix a bug that recently crept into md/linear NeilBrown
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=1060801040847.11976@suse.de \
--to=neilb@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=sim@netnation.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.