SG TUR and AIO
Hi,
I'm trying to make multipath daemon checking asynchronous, and most path checkers use SG. Please bare with some questions on this wild wild topic (to search engine criteria).
Is it possible to submit through AIO (libaio API) any SG command forged with struct sg_io_hdr ?
I've seen the INQ example in the sg3_utils package, so I guess it should work there. But what about "Test Unit Ready" command ?
Also why in the example, only the SG IO write is asynchronous ? Is the inquiry response read qaranteed to be non-blocking ? Would an pread io work at all ?
Is there other pointers to code snippets showing these two subsystems together ?
Thanks for your advices,
cvaroqui
From: Christophe Varoqui <[email protected]>
Subject: SG TUR and AIO
Date: Thu, 14 Jun 2007 00:59:03 +0200
Quoted 11 lines
Hi,
I'm trying to make multipath daemon checking asynchronous, and most path checkers use SG. Please bare with some questions on this wild wild topic (to search engine criteria).
Is it possible to submit through AIO (libaio API) any SG command forged with struct
sg_io_hdr?I've seen the INQ example in the
sg3_utilspackage, so I guess it should work there. But what about "Test Unit Ready" command ?
I don't think that it is supported though sg_simple_aio.c uses io_submit().
Quoted 6 lines
Also why in the example, only the SG IO write is asynchronous ? Is the inquiry response read qaranteed to be non-blocking ? Would an pread io work at all ?
Is there other pointers to code snippets showing these two subsystems together ?
I think that you can handle a SG command asynchronously by using read/write interface with a non-blocking fd.