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

FUJITA Tomonori fujita.tomonori
Thu Mar 13 11:44:03 CET 2008


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.

The current git head is:

commit 1de2e56109e35f594a449bb7cd2eeccbdb8dda49
Author: Mark Harvey <markh794 at gmail.com>
Date:   Wed Mar 5 15:27:00 2008 +0900

    sbc: remove dead code
    
    Signed-off-by: Mark Harvey <markh794 at gmail.com>
    Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>


> The patch doesn't apply cleanly on tgt-20071227 (latest development 
> release found in http://stgt.berlios.de/releases).
> 
> Perhaps I'm missing something?




More information about the stgt mailing list