Correct GEOM bio handling
Lukas Ertl
le at FreeBSD.org
Thu Jun 10 20:05:38 GMT 2004
Hi there,
I've run into a problem with how to correctly handle struct bios in GEOM.
I have the following scenario in vinum:
A plex needs to be synced because its data is out-of-date. The solution I
was thinking of is to create a kthread which reads the data from a 'good'
plex and writes it out to the 'bad' plex. Now, it would be ideal if
'normal' requests (which are not part of this rebuild process) are already
accepted while the rebuild process is still on-going. Of course, this
could be a problem if the new data is later overwritten by the rebuild
process. So I was thinking of cloning the incoming bio, check if the
adjusted offsets are beyond where the rebuild process currently is, and if
they are put the clone on a 'waitlist' where it will be picked up by the
rebuilding kthread once the rebuild pointer is far enough and
then scheduled down.
The rebuilding itself works fine, the requests on the waitqueue are
detected, but they seem to be ignored once I g_io_request() them, and the
process that initiated them is stuck.
So, I'm thinking that I'm missing some important detail in this bio
handling, and I could use some input from you guys.
Thank you,
le
--
Lukas Ertl http://homepage.univie.ac.at/l.ertl/
le at FreeBSD.org http://people.freebsd.org/~le/
More information about the freebsd-geom
mailing list