[Drbd-dev] Behaviour of verify: false positives -> true positives
thomas.schoebel-theuer at 1und1.de
Wed Oct 1 13:28:02 CEST 2008
> as private_bio is a clone of master_bio,
> it shares its bvec, thus the pages.
Oops, I didn't realize that (and I tested the copy version only briefly
because I was more interested in the checksumming because of the kernel log
messages). The implications are clear to me.
IMHO best solution would be the existence of a bio_copy() in addition to
bio_clone() in bio.h, but even if we would get it into the upstream it would
not help for elder kernels.
> you need to remember the original pages, and you need to restore them
> before completion of the master bio.
Well, one problem is that the length of bvec could be nearly arbitrary (in
theory), so preclaiming "enough" space in struct drbd_request is probably no
good idea. Well, kmalloc() would be possible to keep the allocation dynamic
without wasting space.
But what about simply generating a completely new bio and copying over all the
stuff by hand? This would mean to implement some sort of bio_copy() in the
local code which could then later be lifted upstreams if other people liked
it too. What do you think is better?
Thanks for feedback,
More information about the drbd-dev