[Drbd-dev] Re: drbd uses wrong API for struct bio
lmb at suse.de
Mon Jan 24 13:52:17 CET 2005
On 2005-01-24T13:24:46, Lars Marowsky-Bree <lmb at suse.de> wrote:
> So I converted that to use bio_alloc() and bio_put() etc correctly, but
> this wonderful beautiful code in drbd_worker.c assumes that every bio it
> gets is embedded in a epoch_entry struct and uses the container_of()
> macro to convert from the bio to the enclosing struct.
> Which of course no longer works if the private_bio is indeed a pointer.
We could point bi_private at the epoch entry and have the epoch entry
reference the mdev in the Tl_epoch_entry and make this work again.
Would that be ok?
Except of course of not being useful for drbd_req_prepare_write/read(),
where there is no Tl_epoch_entry available. Sigh.
Lars Marowsky-Brée <lmb at suse.de>
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business
More information about the drbd-dev