On 9/8/05, David Howells <[EMAIL PROTECTED]> wrote: > > > Is it possible to reuse a BIO once the callback on it has been invoked to > indicate final completion? Or does it have to be released and another one > allocated? >
The thing which I did in my virtual caching device driver is I keeps the pointer of BIO got from the kernel in my locally created BIO's private field (and fill other fields with the original BIO's Data) and sends it to other caching device and when got the end_io for that BIO (like in read from caching device and writing to target device) I put that in the queue and one of my thread directly sends that to the target device without changed except replacing the sector of caching device to the target device sector and after getting completion signal from target device, I just freed that BIO or move it to my free pool of BIOs and just call the completion for the original BIO taken back from the private field of local BIO .......... This means we can reuse BIO sended to one device and then sending that to other device after getting completion signal from first device ......... But I can't say this about the original kernel BIO b/c I m not sending it to any of my devices !!!! -- Fawad Lateef - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/