Re: [patch] md superblock update failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2005-03-17T09:15:39, Neil Brown <neilb@xxxxxxxxxxxxxxx> 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 <lmb@xxxxxxx>

-- 
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux