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

FUJITA Tomonori tomof
Mon Mar 10 12:01:27 CET 2008


On Mon, 10 Mar 2008 11:48:09 +0100
Tomasz Chmielewski <mangoo at wpkg.org> wrote:

> FUJITA Tomonori schrieb:
> 
> (...)
> 
> >> But it looks that there is still this issue then - so it may fail sometimes:
> >>
> >>   there is a race
> >>   between the first and second operations (that is, you need to peform
> >>   the second right after the first, before the initiator tries to
> >>   connect). I'm fine with changing the default state to 'offline'.
> >>
> >> ?
> > 
> > Then, at least, try that to see it works for you. After that, you can
> > say something like, it works for me, but I want the default state
> > 'offline'.
> 
> No, it doesn't work for me because of the race mentioned above, or, 
> described once again, below - this is what happens to the target and 
> initiator if we want to restart the target (i.e., target software 
> upgrade or target machine restart, because of kernel, hardware upgrade 
> etc.):

Can you try the following patch works with the latest git:

diff --git a/usr/target.c b/usr/target.c
index 50769f6..89f90cb 100644
--- a/usr/target.c
+++ b/usr/target.c
@@ -1636,7 +1636,7 @@ int tgt_target_create(int lld, int tid, char *args)
 
 	target->bst = bst;
 
-	target->target_state = SCSI_TARGET_RUNNING;
+	target->target_state = SCSI_TARGET_OFFLINE;
 	target->lid = lld;
 
 	list_for_each_entry(pos, &target_list, target_siblings)



More information about the stgt mailing list