On Mon, 10 Jun 2013 10:15:05 -0400 Joe Lawrence <joe.lawrence@xxxxxxxxxxx> wrote: > A few outstanding questions that I have, maybe Neil or someone more > familiar with the code could answer. > > Q1 - Is mddev->chunk_sectors is always zero for RAID1? Not always. But often. It is largely ignored. I think the only effect is to round the size of the device down to a multiple of the chunk size. > > Q2 - I noticed handle_write_finished calls narrow_write_error to try and > potentially avoid failing an entire device. In my tests, > narrow_write_error never succeeded as rdev->badblocks.shift = -1. Yes. You would need a newer mdadm (from my git tree) to get badblocks.shift to something else. > > I think this part of the bad block list code Neil has been working > on. I don't suppose this is the proper place for MD to reset > write_same_max_bytes to disable future WRITE SAME and handling the > individual writes here instead of the block layer? If a drive reports that WRITE SAME works, but it doesn't, then I'm not sure that I can be happy about working with that drive. If a drive has some quirky behaviour wrt WRITE SAME, then that should be handled in some place where 'quirks' are handled - certainly not in md. I've applied that patch below - thanks. NeilBrown > > Regards, > > -- Joe > > > From b12c24ee0fce802f35263da65d236694b01c99cf Mon Sep 17 00:00:00 2001 > From: Joe Lawrence <joe.lawrence@xxxxxxxxxxx> > Date: Fri, 7 Jun 2013 15:25:54 -0400 > Subject: [PATCH] raid1: properly set blk_queue_max_write_same_sectors > > MD RAID1 chunk_sectors will always be zero, unlike RAID0, so RAID1 does > not need to worry about limiting the write same sectors in that regard. > Let disk_stack_limits choose the minimum of the RAID1 components write > same values. > > Signed-off-by: Joe Lawrence <joe.lawrence@xxxxxxxxxxx> > --- > drivers/md/raid1.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c > index fd86b37..3dc9ad6 100644 > --- a/drivers/md/raid1.c > +++ b/drivers/md/raid1.c > @@ -2821,9 +2821,6 @@ static int run(struct mddev *mddev) > if (IS_ERR(conf)) > return PTR_ERR(conf); > > - if (mddev->queue) > - blk_queue_max_write_same_sectors(mddev->queue, > - mddev->chunk_sectors); > rdev_for_each(rdev, mddev) { > if (!mddev->gendisk) > continue;
Attachment:
signature.asc
Description: PGP signature