Re: [PATCH] scsi: iscsi_tcp: Explicitly cast param in iscsi_sw_tcp_host_get_param

2018-10-06 Thread 'Nick Desaulniers' via open-iscsi
On Wed, Oct 3, 2018 at 6:06 PM Nathan Chancellor
 wrote:
>
> Clang warns when one enumerated type is implicitly converted to another.
>
> drivers/scsi/iscsi_tcp.c:803:15: warning: implicit conversion from
> enumeration type 'enum iscsi_host_param' to different enumeration type
> 'enum iscsi_param' [-Wenum-conversion]
>  , param, buf);
> ^
> 1 warning generated.
>
> iscsi_conn_get_addr_param handles ISCSI_HOST_PARAM_IPADDRESS just fine
> so add an explicit cast to iscsi_param to make it clear to Clang that
> this is expected behavior.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/153
> Signed-off-by: Nathan Chancellor 
> ---
>  drivers/scsi/iscsi_tcp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
> index b025a0b74341..23354f206533 100644
> --- a/drivers/scsi/iscsi_tcp.c
> +++ b/drivers/scsi/iscsi_tcp.c
> @@ -800,7 +800,8 @@ static int iscsi_sw_tcp_host_get_param(struct Scsi_Host 
> *shost,
> return rc;
>
> return iscsi_conn_get_addr_param((struct sockaddr_storage *)
> -, param, buf);
> +,
> +(enum iscsi_param)param, 
> buf);

Alternatively, you could also just pass ISCSI_HOST_PARAM_IPADDRESS in
place of the cast (since in this case param ==
ISCSI_HOST_PARAM_IPADDRESS), but I don't feel strongly about this
(maybe the maintainers do).
Reviewed-by: Nick Desaulniers 

> default:
>     return iscsi_host_get_param(shost, param, buf);
> }
> --
> 2.19.0
>


-- 
Thanks,
~Nick Desaulniers

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


same volume two different hosts

2009-08-03 Thread nick

Hi All,

I would like to knw if i can present same volume to two hosts?

I am using Stonefly Voyager as SAN and the host would be Xen.

Thanks in Advance
Nick

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



same volume on two hosts

2009-08-03 Thread nick

Hi All,

i would like to know if i can assign the same volume to hosts?

I am using Stonefly Voyager as SAN and the host is Xen Server.

Thanks in Advance
Nick


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: iscsitarget (IET) help?

2008-10-03 Thread Nick

Ming was saying that the iet dev list is a general list for both
development work and also for help with using the product.  Unlike
most open source projects, the IET project does not have a separate
users list from the dev list, so posting your use question in the
dev list is an acceptable method of trying to obtain help - after, of
course, you've searched the iet development list archives for the
problem and determined it hasn't already been discussed.

I don't think Ming was trying to be rude - just trying to offer a
quick answer to point you back at the IET dev list. :-)

-Nick

On Oct 2, 9:18 am, Ben Lake [EMAIL PROTECTED] wrote:
 I'm aware of what this list is for. That is why I didn't state my
 problem and ask for help. We're in the same community so I figured I'd ask.

 I suppose I'll subscribe to the IET dev list and ask use questions then.
 Albeit that isn't usually a welcomed practice. Thanks for the info.

 Ming Zhang wrote:
  this is open-iscsi list. not for iet.

  On Thu, 2008-10-02 at 10:52 -0400, Ben Lake wrote:
  I'm curious if anyone has located a resource to get help with problems
  using iscsitarget? All I see is a development mailing list and haven't

  that list is for both use and development. u should search list archive
  and see if your problem solved already.

  found an IRC group or anything. I have an issue Google isn't helping
  with. Any ideas as to where you've found help would be appreciated.

  Cheers,

  


  smime.p7s
 4KViewDownload

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Specify SCSI ID

2008-09-30 Thread Nick

On Sep 30, 8:16 am, Konrad Rzeszutek [EMAIL PROTECTED] wrote:
 On Mon, Sep 29, 2008 at 05:50:17PM -0700, Nick wrote:

  On Sep 29, 3:49 pm, Konrad Rzeszutek [EMAIL PROTECTED] wrote:
Here's the output:
[EMAIL PROTECTED] ~]# lsscsi
[20:0:0:0]   tape    SEAGATE  ULTRIUM06242-XXX 1613  /dev/st0
[21:0:0:0]   mediumx STK      L20              0215  /dev/sch0
[22:0:0:0]   tape    SEAGATE  ULTRIUM06242-XXX 1613  /dev/st1

As you can see, it does not maintain devids but each one becomes id
0.  As a result, I get the following message when the changer loads:

   Yeah, this is the fault of your storage. It converst the SCSI Ids
   in each seperate target.

  I'm not sure what you mean by this being a fault of my storage.  It is
  normal for libraries and tape drives to have different SCSI IDs.  I'm
  using SCST for the iSCSI Target Server, and that either allows me to
  specify all of the SCSI devices under the same target as different
  LUNs, or specify them under different targets.  SCST does not allow me

 Aha! Do it as different LUNs.

  to specify the ID the devices are presented as - maybe that's the
  fault to which you're referring?

 I was thinking that it represented them as different targets - which is
 what you don't want in your case.

It does allow me to present them as different targets, but it also
allows me to present them as different LUNs on the same target.  I'm
not sure why I can't specify different IDs on the same target though -
that seems like a missing feature for SCST.  I tried out the
different LUNs method last night and it seems to be somewhat
functional, although using the mtx unload command doesn't seem to
trigger an eject on the tape drive - I have to run an mt -f /dev/
st0 eject and the do the unload.  Maybe this is normal, but it seems
like usually you can just do the unload and that will trigger an eject
on the drive, then move the media.  Anyway, I'll keep playing with
that...

-Nick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Specify SCSI ID

2008-09-29 Thread Nick

On Sep 29, 10:29 am, [EMAIL PROTECTED] wrote:
 On Sep 28, 8:58 am, Nick [EMAIL PROTECTED] wrote:

  I'm trying to use open-iscsi to connect to an iSCSI-based tape
  library.  The library has two drives, so there are three IDs.
  Unfortunately, the library is picky about having the same SCSI IDs as
  are configured directly on the library, which means on the iSCSI
  client end I need to make sure that the devices show up with those
  same IDs.  This presents two problems:
  1) Each of the devices is presented as a separate iSCSI target.  This
  means that when open-iscsi connects to these three targets, they each
  get put on a different SCSI bus.  Any way to force all three targets
  onto the same bus?
  2) open-iscsi starts ID numbering at 0.  Is there any way to configure
  an iSCSI target to show up at a certain ID?  So, my tape library is
  SCSI ID 8, my first drive is 9, and my second drive is 10.  Is there
  any way to configure these targets to show up at IDs 8, 9, and 10?

 Are you familar with udev? Each target has a unique name right? Since
 each target has one device, you could write a udev rule that grabs the
 target name and for target X creates a special /dev/my_device_name for
 the tape device accessed through it.

But the changer doesn't work by device names, it works by device IDs.
This is the message I get when the changer loads:
ch0: type #1 (mt): 0x0+1 [medium transport]
ch0: type #2 (st): 0x3e8+20 [storage]
ch0: type #3 (ie): 0xa+0 [import/export]
ch0: type #4 (dt): 0x1f4+2 [data transfer]
ch0: dt 0x1f4: ID 9, LUN 0, Huh? device not found!
ch0: dt 0x1f5: ID 10, LUN 0, Huh? device not found!
ch0: INITIALIZE ELEMENT STATUS, may take some time ...
ch0: ... finished
ch 21:0:0:0: Attached scsi changer ch0
ch 21:0:0:0: Attached scsi generic sg2 type 8

As you can see, it's looking for specific SCSI IDs, probably on the
same SCSI bus, to try to find the tape devices.

-Nick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Specify SCSI ID

2008-09-29 Thread Nick



On Sep 29, 9:03 am, Konrad Rzeszutek [EMAIL PROTECTED] wrote:
 On Sun, Sep 28, 2008 at 06:58:36AM -0700, Nick wrote:

  I'm trying to use open-iscsi to connect to an iSCSI-based tape
  library.  The library has two drives, so there are three IDs.
  Unfortunately, the library is picky about having the same SCSI IDs as
  are configured directly on the library, which means on the iSCSI
  client end I need to make sure that the devices show up with those
  same IDs.  This presents two problems:
  1) Each of the devices is presented as a separate iSCSI target.  This
  means that when open-iscsi connects to these three targets, they each
  get put on a different SCSI bus.  Any way to force all three targets
  onto the same bus?

 Nope. Each of the connection is considered as a new HBA.

Bummer...this may make this an unusable setup for me :-(.


  2) open-iscsi starts ID numbering at 0.  Is there any way to configure
  an iSCSI target to show up at a certain ID?  So, my tape library is
  SCSI ID 8, my first drive is 9, and my second drive is 10.  Is there
  any way to configure these targets to show up at IDs 8, 9, and 10?

 When you say ID, do you mean LUN?  What does 'lsscsi' show?
 Is your first drive the second target? If that is the case, it should
 show up as so (with a different vendor/product name of course):

 [0:0:0:8]    tape       blah      blah                                  
 /dev/st0
 [1:0:0:9]    disk    ATA      WDC WD1600JD-75H 08.0  /dev/sda
 [2:0:0:10]   disk    ATA      ST3160812AS      3.AD  /dev/sdb

 But the last digit ought to be the same as your SCSI ID, unless the
 target decided to flatten this an opt to present them as 1-to-1 mapping
 (one target == one LUN).

Here's the output:
[EMAIL PROTECTED] ~]# lsscsi
[20:0:0:0]   tapeSEAGATE  ULTRIUM06242-XXX 1613  /dev/st0
[21:0:0:0]   mediumx STK  L20  0215  /dev/sch0
[22:0:0:0]   tapeSEAGATE  ULTRIUM06242-XXX 1613  /dev/st1

As you can see, it does not maintain devids but each one becomes id
0.  As a result, I get the following message when the changer loads:
ch0: type #1 (mt): 0x0+1 [medium transport]
ch0: type #2 (st): 0x3e8+20 [storage]
ch0: type #3 (ie): 0xa+0 [import/export]
ch0: type #4 (dt): 0x1f4+2 [data transfer]
ch0: dt 0x1f4: ID 9, LUN 0, Huh? device not found!
ch0: dt 0x1f5: ID 10, LUN 0, Huh? device not found!
ch0: INITIALIZE ELEMENT STATUS, may take some time ...
ch0: ... finished
ch 21:0:0:0: Attached scsi changer ch0
ch 21:0:0:0: Attached scsi generic sg2 type 8

Seems like it's pretty picky about having the right IDs.  Maybe there
are some module parameters for the ch module that would let me tell it
where to try to find the drives?

-Nick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Specify SCSI ID

2008-09-29 Thread Nick

Those look helpful, but the issue is that these seem to only take a
single id and lun and don't let you specify the host bus on which
these devices are located.  I suppose I could try presenting them on
the same ID (same iSCSI Target) with different LUNs, then all I'd have
to do is set dt_id to 0 and use the two LUNs.  Worth a shot, I
guess...

-Nick

On Sep 29, 3:49 pm, Konrad Rzeszutek [EMAIL PROTECTED] wrote:
  Here's the output:
  [EMAIL PROTECTED] ~]# lsscsi
  [20:0:0:0]   tape    SEAGATE  ULTRIUM06242-XXX 1613  /dev/st0
  [21:0:0:0]   mediumx STK      L20              0215  /dev/sch0
  [22:0:0:0]   tape    SEAGATE  ULTRIUM06242-XXX 1613  /dev/st1

  As you can see, it does not maintain devids but each one becomes id
  0.  As a result, I get the following message when the changer loads:

 Yeah, this is the fault of your storage. It converst the SCSI Ids
 in each seperate target.

  ch0: type #1 (mt): 0x0+1 [medium transport]
  ch0: type #2 (st): 0x3e8+20 [storage]
  ch0: type #3 (ie): 0xa+0 [import/export]
  ch0: type #4 (dt): 0x1f4+2 [data transfer]
  ch0: dt 0x1f4: ID 9, LUN 0, Huh? device not found!
  ch0: dt 0x1f5: ID 10, LUN 0, Huh? device not found!
  ch0: INITIALIZE ELEMENT STATUS, may take some time ...
  ch0: ... finished
  ch 21:0:0:0: Attached scsi changer ch0
  ch 21:0:0:0: Attached scsi generic sg2 type 8

  Seems like it's pretty picky about having the right IDs.  Maybe there
  are some module parameters for the ch module that would let me tell it
  where to try to find the drives?

 Try 'modinfo ch'. The 'dt_id' and 'dt_lun' looks promising.



  -Nick


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Specify SCSI ID

2008-09-29 Thread Nick

On Sep 29, 3:49 pm, Konrad Rzeszutek [EMAIL PROTECTED] wrote:
  Here's the output:
  [EMAIL PROTECTED] ~]# lsscsi
  [20:0:0:0]   tape    SEAGATE  ULTRIUM06242-XXX 1613  /dev/st0
  [21:0:0:0]   mediumx STK      L20              0215  /dev/sch0
  [22:0:0:0]   tape    SEAGATE  ULTRIUM06242-XXX 1613  /dev/st1

  As you can see, it does not maintain devids but each one becomes id
  0.  As a result, I get the following message when the changer loads:

 Yeah, this is the fault of your storage. It converst the SCSI Ids
 in each seperate target.


I'm not sure what you mean by this being a fault of my storage.  It is
normal for libraries and tape drives to have different SCSI IDs.  I'm
using SCST for the iSCSI Target Server, and that either allows me to
specify all of the SCSI devices under the same target as different
LUNs, or specify them under different targets.  SCST does not allow me
to specify the ID the devices are presented as - maybe that's the
fault to which you're referring?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---