On Sep 28, 2011, at 9:47 AM, Stefan Hajnoczi wrote: I need a helper thread to do blocking IO. The device IOCTLS are inherently blocking, unfortunately.
posix-aio-compat.c already implements a threadpool. It is geared towards using the QEMU block layer (BlockDriverState) but the pure ioctl codepath can be used without a BlockDriverState by passing NULL. So this could save you some effort, check out paio_submit(). ;) yeah, I realized that after looking at the code that I could have used that infrastructure. May be in the next release of this driver I will do that or more realistically when I write another driver, I will make use of it. However, I have one reservation about that code. Like you said, it is geared towards the QEMU block driver. I believe the code can be reworked to be more generic so that it can be reused elsewhere as is. ani ============================================================ The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any reproduction, dissemination or distribution of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Tellabs ============================================================