[Drbd-dev] Re: bio clone must copy io_vec
philipp.reisner at linbit.com
Thu Jan 27 10:47:09 CET 2005
I am reffering to Jens' fix for md...
> The way md uses bio_clones, it's possible for the original bio to be freed
> before the clone is freed. This means the clone ->bi_io_vec points to freed
> memory potentially. Fix it by duplicating the io_vec as well.
In DRBD the thing is different.
We use __bio_clone() but we will never end IO for our original bio before
we have not finished IO for our cloned BIO.
My fist thought was to have a own copy of __bio_clone() in place, which
behaves like the __bio_clone() of Linux-2.6.10-vanilla.
But on the other hand I think I can convert it over to use bio_clone()
within a few hours. Well I will give it a try, and let you know if
I end up with a patch...
PS: Jens, when I am the owner of a BIO I can do with the private
member what ever I want, right ?
And I am the owner of a bio clones with bio_clone() right ?
: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria http://www.linbit.com :
More information about the drbd-dev