[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] Re: [PATCH 12/17] bottom-layer barrier support
- From: Mikulas Patocka <mpatocka redhat com>
- To: Alasdair G Kergon <agk redhat com>
- Cc: dm-devel redhat com
- Subject: Re: [dm-devel] Re: [PATCH 12/17] bottom-layer barrier support
- Date: Mon, 27 Apr 2009 19:42:48 -0400 (EDT)
On Tue, 28 Apr 2009, Alasdair G Kergon wrote:
> On Mon, Apr 27, 2009 at 07:32:00PM -0400, Mikulas Patocka wrote:
> > On entry to the function it holds zero if it is processing zero-length
> > barrier.
>
> OK - so that is a clear definition the writer of a target map function can
> rely upon, good.
>
> > The line "bio->bi_sector = dc->start_write + (bio->bi_sector -
> > ti->begin)" can set it to non-zero, so I set it to zero again. If you
> > want, you can somehow rearrange the code so that "bio->bi_sector =
> > dc->start_write + (bio->bi_sector - ti->begin)" is performed only if the
> > request has non-zero length.
>
> Please do that. In dm I try to enforce a rule that the values of variables
> always correspond to their definitions - if a calculation needs intermediate
> steps then different and meaningful intermediate variables are used
> instead. Here, bi_sector seems to be set to a meaningless intermediate
> value which is a recipe for confusion.
OK.
Mikulas
> Alasdair
> --
> agk redhat com
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]