[Stgt-devel] [Scst-devel] Integration of SCST in themainstream Linux kernel
Tomasz Chmielewski
mangoo
Thu Mar 13 12:24:33 CET 2008
FUJITA Tomonori schrieb:
> On Thu, 13 Mar 2008 10:43:42 +0100
> Tomasz Chmielewski <mangoo at wpkg.org> wrote:
>
>> FUJITA Tomonori schrieb:
>>
>>> OK, can you try the following patch?
>>>
>>> I've added 'system status':
>>>
>>> rose:/home/fujita# ./tgt/usr/tgtadm --op show --mode sys
>>> System:
>>> Status=offline
>>> iSNS:
>>> iSNS=Off
>>> iSNSServerIP=
>>> iSNSServerPort=3205
>>> iSNSAccessControl=Off
>>>
>>> If the system status is 'offline', tgtd accepts a new connection and
>>> then close it.
>>>
>>> rose:/home/fujita# ./tgt/usr/tgtadm --op update --mode sys -n state -v
>>> running
>>>
>>> rose:/home/fujita# ./tgt/usr/tgtadm --op show --mode sys
>>> System:
>>> Status=running
>>> iSNS:
>>> iSNS=Off
>>> iSNSServerIP=
>>> iSNSServerPort=3205
>>> iSNSAccessControl=Off
>>>
>>> When you finish configuring targets, then change the state to
>>> 'running'.
>>>
>>> The patch is hacky but if it works, I'll clean up and merge it.
>>>
>>>
>>> diff --git a/usr/iscsi/iscsi_tcp.c b/usr/iscsi/iscsi_tcp.c
>>> index 09ed0e5..c1f97b6 100644
>>> --- a/usr/iscsi/iscsi_tcp.c
>>> +++ b/usr/iscsi/iscsi_tcp.c
>>> @@ -104,6 +104,9 @@ static void accept_connection(int afd, int events, void *data)
>>> return;
>>> }
>>>
>>> + if (!is_system_available())
>>> + goto out;
>>> +
>>> ret = set_keepalive(fd);
>>> if (ret)
>>> goto out;
>> Where should I apply this patch? In today's git there is no such thing
>> as "ret = set_keepalive(fd);" in usr/iscsi/iscsi_tcp.c.
>
> It's against the git head. I think that there's something wrong with
> your git tree.
Indeed. I had an old revision I guess?
Anyway - the patch works great, iptables are no longer needed!
If the patch is finally integrated, I guess README files need updating,
too to reflect the change.
--
Tomasz Chmielewski
http://wpkg.org
More information about the stgt
mailing list