[Stgt-devel] [Scst-devel] Integration of SCST in the mainstream Linux kernel

Tomasz Chmielewski mangoo
Thu Mar 13 10:43:42 CET 2008


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.

The patch doesn't apply cleanly on tgt-20071227 (latest development 
release found in http://stgt.berlios.de/releases).

Perhaps I'm missing something?


-- 
Tomasz Chmielewski
http://wpkg.org



More information about the stgt mailing list