From: hooanon05@yahoo.co.jp Subject: Re: [Iscsitarget-devel] scsi multimedia command set To: iet-dev References: Date: Sat, 11 Jun 2005 21:53:09 +0900 Ming Zhang: > * in rmmcio_attach(), the new iet has better param parse code, try to > use that. i am afraid there is a bug around target_type member of struct iscsi_target and struct iscsi_trgt_param since iet-0.4.9. and it is not fixed in the later versions. i still cannot get the meaning of target_type member in those two structures. does this patch follow what you actually want to do? > tomof Index: kernel/file-io.c =================================================================== RCS file: /ext1/iscsi/repository/iet-0.4.10/kernel/file-io.c,v retrieving revision 1.1 diff -u -r1.1 file-io.c --- kernel/file-io.c 11 Jun 2005 02:30:57 -0000 1.1 +++ kernel/file-io.c 11 Jun 2005 12:34:37 -0000 @@ -139,7 +139,7 @@ return; p = (u32 *) (volume->scsi_id + VENDOR_ID_LEN); - *(p + 0) = volume->target->target_type; + *(p + 0) = volume->target->trgt_param.target_type; *(p + 1) = volume->target->tid; *(p + 2) = (unsigned int) inode->i_ino; *(p + 3) = (unsigned int) inode->i_sb->s_dev; Index: kernel/iscsi.h =================================================================== RCS file: /ext1/iscsi/repository/iet-0.4.10/kernel/iscsi.h,v retrieving revision 1.1 diff -u -r1.1 iscsi.h --- kernel/iscsi.h 11 Jun 2005 02:30:57 -0000 1.1 +++ kernel/iscsi.h 11 Jun 2005 12:34:37 -0000 @@ -115,8 +124,6 @@ struct worker_thread_info wthread_info; struct semaphore target_sem; - - int target_type; }; struct iscsi_queue { Index: kernel/wthread.c =================================================================== RCS file: /ext1/iscsi/repository/iet-0.4.10/kernel/wthread.c,v retrieving revision 1.1 diff -u -r1.1 wthread.c --- kernel/wthread.c 11 Jun 2005 02:30:57 -0000 1.1 +++ kernel/wthread.c 11 Jun 2005 12:34:37 -0000 @@ -50,7 +50,7 @@ static int cmnd_execute(struct iscsi_cmnd *cmnd) { - int type = cmnd->conn->session->target->target_type; + int type = cmnd->conn->session->target->trgt_param.target_type; assert(target_type_array[type]->execute_cmnd); return target_type_array[type]->execute_cmnd(cmnd);