Re: [Patch v2 2/2] libiscsi: Remove iscsi_destroy_session

2017-09-14 Thread Johannes Thumshirn
On Wed, Sep 13, 2017 at 05:09:03PM -0700, Lee Duncan wrote:
> On 07/13/2017 09:11 AM, Khazhismel Kumykov wrote:
> > iscsi_session_teardown was the only user of this function. Function
> > currently is just short for iscsi_remove_session + iscsi_free_session.
> > 
> > Signed-off-by: Khazhismel Kumykov <kha...@google.com>
> 
> Why is this needed? I dislike changes that don't fix anything.

The function has no more users left after patch 1, so why keep it bitrotting?

-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

-- 
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.


Re: [RFC PATCH 6/6] bsg: reduce unnecessary arguments for blk_complete_sgv4_hdr_rq()

2017-08-10 Thread Johannes Thumshirn
Looks good,
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

-- 
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.


Re: [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr()

2017-08-10 Thread Johannes Thumshirn
Looks good,
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

-- 
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.


Re: [RFC PATCH 4/6] bsg: refactor ioctl to use regular BSG-command infrastructure for SG_IO

2017-08-10 Thread Johannes Thumshirn
On Wed, Aug 09, 2017 at 04:11:18PM +0200, Benjamin Block wrote:
> + return 0 == (bc->hdr.flags & BSG_FLAG_Q_AT_TAIL);

return !(bc->hdr.flags & BSG_FLAG_Q_AT_TAIL); and make the function return
bool? I have to admit, this is the 1st time I have seen the above construct.

Thanks,
Johannes
-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

-- 
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.


Re: [PATCH] libiscsi: use vzalloc for large allocations in iscsi_pool_init

2017-04-03 Thread Johannes Thumshirn
On Mon, Apr 03, 2017 at 06:30:21AM -0700, Kyle Fortin wrote:
> iscsiadm session login can fail with the following error:
> 
> iscsiadm: Could not login to [iface: default, target: iqn.1986-03.com...
> iscsiadm: initiator reported error (9 - internal error)
> 
> When /etc/iscsi/iscsid.conf sets node.session.cmds_max = 4096, it results
> in 64K-sized kmallocs per session.  A system under fragmented slab
> pressure may not have any 64K objects available and fail iscsiadm session
> login. Even though memory objects of a smaller size are available, the
> large order allocation ends up failing.
> 
> The kernel will print a warning and dump_stack, like below:

There is a series of patches in Andrew's mmotm tree, which introduces
a kvmalloc() function, that does exactly what you're looking for.

Maybe you want to base your patch on top of it.

-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

-- 
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.


Re: [PATCH 22/29] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-09 Thread Johannes Thumshirn
On 03/09/2017 10:26 AM, Reshetova, Elena wrote:
> 
>> On 03/09/2017 08:18 AM, Reshetova, Elena wrote:
>>>> On Mon, Mar 06, 2017 at 04:21:09PM +0200, Elena Reshetova wrote:
>>>>> refcount_t type and corresponding API should be
>>>>> used instead of atomic_t when the variable is used as
>>>>> a reference counter. This allows to avoid accidental
>>>>> refcounter overflows that might lead to use-after-free
>>>>> situations.
>>>>>
>>>>> Signed-off-by: Elena Reshetova <elena.reshet...@intel.com>
>>>>> Signed-off-by: Hans Liljestrand <ishkam...@gmail.com>
>>>>> Signed-off-by: Kees Cook <keesc...@chromium.org>
>>>>> Signed-off-by: David Windsor <dwind...@gmail.com>
>>>>
>>>> This looks OK to me.
>>>>
>>>> Acked-by: Chris Leech <cle...@redhat.com>
>>>
>>> Thank you for review! Do you have a tree that can take this change?
>>
>> Hi Elena,
>>
>> iscsi like fcoe should go via the SCSI tree.
> 
> Thanks Johannes! Should I resend with "Acked-by" added in order for it to be 
> picked up? 

Yes I think this would be a good way to go.

Byte,
Johannes
-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

-- 
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.


Re: [PATCH 22/29] drivers, scsi: convert iscsi_task.refcount from atomic_t to refcount_t

2017-03-09 Thread Johannes Thumshirn
On 03/09/2017 08:18 AM, Reshetova, Elena wrote:
>> On Mon, Mar 06, 2017 at 04:21:09PM +0200, Elena Reshetova wrote:
>>> refcount_t type and corresponding API should be
>>> used instead of atomic_t when the variable is used as
>>> a reference counter. This allows to avoid accidental
>>> refcounter overflows that might lead to use-after-free
>>> situations.
>>>
>>> Signed-off-by: Elena Reshetova <elena.reshet...@intel.com>
>>> Signed-off-by: Hans Liljestrand <ishkam...@gmail.com>
>>> Signed-off-by: Kees Cook <keesc...@chromium.org>
>>> Signed-off-by: David Windsor <dwind...@gmail.com>
>>
>> This looks OK to me.
>>
>> Acked-by: Chris Leech <cle...@redhat.com>
> 
> Thank you for review! Do you have a tree that can take this change? 

Hi Elena,

iscsi like fcoe should go via the SCSI tree.

Byte,
Johannes

-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

-- 
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.


Re: [PATCH 21/29] drivers, s390: convert fc_fcp_pkt.ref_cnt from atomic_t to refcount_t

2017-03-08 Thread Johannes Thumshirn

On 03/08/2017 02:48 PM, Reshetova, Elena wrote:

On 03/06/2017 03:21 PM, Elena Reshetova wrote:

refcount_t type and corresponding API should be
used instead of atomic_t when the variable is used as
a reference counter. This allows to avoid accidental
refcounter overflows that might lead to use-after-free
situations.


The subject is wrong, should be something like "scsi: libfc convert
fc_fcp_pkt.ref_cnt from atomic_t to refcount_t" but not s390.

Other than that
Acked-by: Johannes Thumshirn <j...@kernel.org>


Turns out that it is better that all these patches go through the respective 
maintainer trees, if present.
If I send an updated patch (with subject fixed), could you merge it through 
your tree?


Yes, but this would be the normal scsi tree from Martin and James.

Please include my Ack in the re-sends.

Thanks a lot,
    Johannes


--
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

--
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.


Re: [PATCH 21/29] drivers, s390: convert fc_fcp_pkt.ref_cnt from atomic_t to refcount_t

2017-03-06 Thread Johannes Thumshirn
On 03/06/2017 03:21 PM, Elena Reshetova wrote:
> refcount_t type and corresponding API should be
> used instead of atomic_t when the variable is used as
> a reference counter. This allows to avoid accidental
> refcounter overflows that might lead to use-after-free
> situations.

The subject is wrong, should be something like "scsi: libfc convert
fc_fcp_pkt.ref_cnt from atomic_t to refcount_t" but not s390.

Other than that
Acked-by: Johannes Thumshirn <j...@kernel.org>

-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

-- 
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.


Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id

2016-03-09 Thread Johannes Thumshirn
On Fri, Feb 12, 2016 at 09:38:53AM -0800, Lee Duncan wrote:
> The scsi_transport_iscsi module already uses the ida_simple
> routines for managing the target ID, if requested to do
> so. This change replaces an ever-increasing atomic integer
> that tracks the session ID itself with the ida_simple
> family of routines. This means that the session ID
> will be reclaimed and can be reused when the session
> is freed.
> 
> Note that no maximum is placed on this value, though
> user-space currently only seems to use the lower 24-bits.
> It seems better to handle this in user space, though,
> than to limit the value range for the session ID here.
> 
> Signed-off-by: Lee Duncan <ldun...@suse.com>

Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>

-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

-- 
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.


Re: [PATCH] iscsiuio: Fix lookup of IPv6 router address

2015-05-26 Thread Johannes Thumshirn
On Sun, May 24, 2015 at 04:56:26AM +, Adheer Chandravanshi wrote:
 
 
 From: open-iscsi@googlegroups.com [open-iscsi@googlegroups.com] on behalf of 
 Eddie Wai [eddie@broadcom.com]
 Sent: Friday, May 22, 2015 10:12 PM
 To: open-iscsi@googlegroups.com
 Cc: Johannes Thumshirn; Adheer Chandravanshi
 Subject: Re: [PATCH] iscsiuio: Fix lookup of IPv6 router address
 
 Hi,
 
 Don't mind if I chime in.  From the upstream code, the patch looks good.
 Just curious at who the caller for that might be?
 
 Eddie
 
 On Fri, 2015-05-22 at 10:48 -0500, Mike Christie wrote:
  CCing qlogic.
 
  Which one of you guys is watching over iscsiuio?
 
 
  On 5/21/15, 4:12 AM, Johannes Thumshirn wrote:
   Gnetle ping on this
  
   On Mon, May 11, 2015 at 01:38:12PM +0200, Johannes Thumshirn wrote:
   When iscsiuio performs a lookup in it's routing table
   for the default router, nothing is returned as ndpc_request()
   didn't understand the 'GET_DEFAULT_ROUTER_ADDR' request.
   The solution is to add the request and return the default router
   address.
  
   Signed-off-by: Johannes Thumshirn jthumsh...@suse.de
   ---
 iscsiuio/src/uip/ipv6_ndpc.c | 3 +++
 1 file changed, 3 insertions(+)
  
   diff --git a/iscsiuio/src/uip/ipv6_ndpc.c b/iscsiuio/src/uip/ipv6_ndpc.c
   index 62d1c21..8422d7e 100644
   --- a/iscsiuio/src/uip/ipv6_ndpc.c
   +++ b/iscsiuio/src/uip/ipv6_ndpc.c
   @@ -413,6 +413,9 @@ int ndpc_request(struct uip_stack *ustack, void *in, 
   void *out, int request)
  (struct ipv6_addr *)((struct ndpc_reqptr *)in)-ipv6,
  (struct mac_address *)((struct ndpc_reqptr 
   *)in)-eth);
  break;
   +  case GET_DEFAULT_ROUTER_ADDR:
   +  ipv6_get_default_router_ip_addrs(ipv6c, *(struct ipv6_addr 
   **)out);
   +  break;
  case GET_HOST_ADDR:
  *(struct ipv6_addr **)out = ipv6_find_longest_match(ipv6c,
  (struct ipv6_addr 
   *)in);
   --
   2.3.7
  
  
 
 
 Oops! Sorry for the late response. It was lying in my drafts.
 
 Johannes,
 
 I agree with Eddie. The code looks good upstream wise.
 But I do not see ndpc_request() being called in iscsiuio with 
 GET_DEFAULT_ROUTER_ADDR request.
 Is there some different patch you are working on for that?
 
 Thanks,
 Adheer
 

Just re-checked, the patch is nonesense from an upstream point of view. Seems
like I've been working on a bugfix that was already fixed upstream.

Sorry for the noise.

Johannes



-- 
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 http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


Re: [PATCH] iscsiuio: Fix lookup of IPv6 router address

2015-05-21 Thread Johannes Thumshirn
Gnetle ping on this

On Mon, May 11, 2015 at 01:38:12PM +0200, Johannes Thumshirn wrote:
 When iscsiuio performs a lookup in it's routing table
 for the default router, nothing is returned as ndpc_request()
 didn't understand the 'GET_DEFAULT_ROUTER_ADDR' request.
 The solution is to add the request and return the default router
 address.
 
 Signed-off-by: Johannes Thumshirn jthumsh...@suse.de
 ---
  iscsiuio/src/uip/ipv6_ndpc.c | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/iscsiuio/src/uip/ipv6_ndpc.c b/iscsiuio/src/uip/ipv6_ndpc.c
 index 62d1c21..8422d7e 100644
 --- a/iscsiuio/src/uip/ipv6_ndpc.c
 +++ b/iscsiuio/src/uip/ipv6_ndpc.c
 @@ -413,6 +413,9 @@ int ndpc_request(struct uip_stack *ustack, void *in, void 
 *out, int request)
   (struct ipv6_addr *)((struct ndpc_reqptr *)in)-ipv6,
   (struct mac_address *)((struct ndpc_reqptr *)in)-eth);
   break;
 + case GET_DEFAULT_ROUTER_ADDR:
 + ipv6_get_default_router_ip_addrs(ipv6c, *(struct ipv6_addr 
 **)out);
 + break;
   case GET_HOST_ADDR:
   *(struct ipv6_addr **)out = ipv6_find_longest_match(ipv6c,
   (struct ipv6_addr *)in);
 -- 
 2.3.7
 

-- 
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 http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


[PATCH] iscsiuio: Fix lookup of IPv6 router address

2015-05-15 Thread Johannes Thumshirn
When iscsiuio performs a lookup in it's routing table
for the default router, nothing is returned as ndpc_request()
didn't understand the 'GET_DEFAULT_ROUTER_ADDR' request.
The solution is to add the request and return the default router
address.

Signed-off-by: Johannes Thumshirn jthumsh...@suse.de
---
 iscsiuio/src/uip/ipv6_ndpc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/iscsiuio/src/uip/ipv6_ndpc.c b/iscsiuio/src/uip/ipv6_ndpc.c
index 62d1c21..8422d7e 100644
--- a/iscsiuio/src/uip/ipv6_ndpc.c
+++ b/iscsiuio/src/uip/ipv6_ndpc.c
@@ -413,6 +413,9 @@ int ndpc_request(struct uip_stack *ustack, void *in, void 
*out, int request)
(struct ipv6_addr *)((struct ndpc_reqptr *)in)-ipv6,
(struct mac_address *)((struct ndpc_reqptr *)in)-eth);
break;
+   case GET_DEFAULT_ROUTER_ADDR:
+   ipv6_get_default_router_ip_addrs(ipv6c, *(struct ipv6_addr 
**)out);
+   break;
case GET_HOST_ADDR:
*(struct ipv6_addr **)out = ipv6_find_longest_match(ipv6c,
(struct ipv6_addr *)in);
-- 
2.3.7

-- 
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 http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.