[dm-devel] [PATCH 2/2] Use low pointer bits for dm io region
Mikulas Patocka
mpatocka at redhat.com
Wed Nov 11 20:50:39 UTC 2009
On Wed, 11 Nov 2009, Alasdair G Kergon wrote:
> On Wed, Nov 11, 2009 at 04:26:15PM +0900, Kiyoshi Ueda wrote:
> > The code is not easily readable for me.
>
> Introducing some macros will probably deal with that.
There is:
- bit masking in bio_set_io_region and bio_get_io_region (but they are
complement to each other and bit tricks are not diffused elsewhere)
- an ugly trick in sync_io to work around gcc definicency (it can't align
variables on stack)
Otherwise, it's standard C.
Mikulas
> > Why don't you introduce a new structure in which those two things
> > can be stored, and allocate/attach it per bio?
>
> That code didn't want the overhead of managing additional allocations.
>
> Alasdair
>
More information about the dm-devel
mailing list