On Tuesday November 28, [EMAIL PROTECTED] wrote:
> 
> <snip>
> 
> > > If I understood correctly, bh->b_rsector is used to know if the sector
> > > number of the request being processed is not inside the resync range. 
> > > 
> > > In case it is, it sleeps waiting for the resync daemon. Otherwise, it can
> > > send the operation to the lower level block device(s). 
> > > 
> > > The problem is that the code does not check for the request length to know
> > > if the last sector of the request is smaller than conf->start_active. 
> > > 
> > > For example, if we have conf->start_active = 1000, a write request with 8
> > > sectors and bh->b_rsector = 905 is allowed to be done. 3 blocks (1001,
> > > 1002 and 1003) of this request are inside the resync range. 
> > 
> > The reason is subtle, but this cannot happen.
> > resync is always done in full pages. So (on intel) start_active will
> > always be a multiple of 8.  Also, b_size can be at most one page
> > (i.e. 4096 == 8 sectors) and b_rsector will be aligned to a multiple
> > of b_size.  Given this, if rsector < start_active, you can be certain
> > that rsector+(b_size>>9) <= start_active, so there isn't a problem and
> > your change is not necessary.   Adding a comment to the code to
> > explain this subtlety might be sensible though...
> 
> This becomes a problem with kiobuf requests (I have a patch to make raid1
> code kiobuf-aware).
> 
> With kiobufes, its possible (right now) to have requests up to 64kb, so
> the current code is problematic. 
> 

In that case, you change sounds quite reasonable and should be
included in you patch to make raid1 kiobuf-aware.

Is there a URL to this patch? Can I look at it?

NeilBrown

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to