On 2005-03-17T09:15:39, Neil Brown <[EMAIL PROTECTED]> wrote:
> Yes... thanks....
> The whole '100 times' thing is completely bogus isn't it...
Yes.
> By co-incidence, I've just recently be modifying this code to do
> writes more intelligently. My goal was to get it to write all the
> superblocks in parallel rather than in series. The result is below
> which will probably go to Andrew shortly. It add the required
> md_error and removes the 'try 100 times'.
> It also loops 'round to re-write the superblock if one of the writes
> failed, thus dirtying the superblock.
Your patch is much cleaner and nicer. I'll pick that up when it goes to
Andrew.
Minor cleanup:
> @@ -1325,24 +1336,24 @@ repeat:
>
> dprintk("%s ", bdevname(rdev->bdev,b));
> if (!rdev->faulty) {
> - err += write_disk_sb(rdev);
> + md_super_write(mddev,rdev,
> + rdev->sb_offset<<1, MD_SB_BYTES,
> + rdev->sb_page);
> + dprintk(KERN_INFO "(write) %s's sb offset: %llu\n",
> + bdevname(rdev->bdev,b),
> + (unsigned long long)rdev->sb_offset);
> +
> } else
> dprintk(")\n");
> if (!err && mddev->level == LEVEL_MULTIPATH)
> /* only need to write one superblock... */
> break;
> }
The "!err &&" part can probably go away, right?
Sincerely,
Lars Marowsky-Br�e <[EMAIL PROTECTED]>
--
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html