[stgt] stgt basic kernel interface questions
Joe Eykholt
jeykholt at cisco.com
Tue Jun 29 18:22:12 CEST 2010
On 6/29/10 1:34 AM, FUJITA Tomonori wrote:
> On Mon, 28 Jun 2010 12:46:53 -0700
> Joe Eykholt<jeykholt at cisco.com> wrote:
>
>> I'm struggling to understand a few things. Is there an
>> architecture manual I can look at or a good e-mail thread
>> that's discussed the overall design?
>
> Sorry, no doc about the design. Please feel free to ask anything.
>
>
>> My specific question at this point deals with how the kernel
>> knows the status of a WRITE command.
>>
>> My guess is that for WRITEs, the user-kernel interactions are:
>>
>> 1. TGT_KEVENT_CMD_REQ - kernel presents command to tgtd.
>> 2. TGT_UEVENT_CMD_RSP - tgtd gives buffer address to kernel
>> - send XFER_RDY
>> - kernel fills in buffer
>> 3. TGT_KEVENT_CMD_DONE - kernel indicates write data in buffer
>>
>> .... then, what tells the kernel it's safe to send the response?
>> If we do it between 2 and 3, then the data isn't really safe yet.
>> Is there another TGT_UEVENT_CMD_RSP?
>
> You mean that the data might not be committed to disk persistently?
Yes. If the system were to crash just after the response was sent,
the data might be lost.
So, it seems we should modify the interactions to have one to
say "get the data" between 1 and 2, or something like that.
Joe
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list