linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix RTRS compilation with block layer disabled
       [not found] <e132ee19-ff55-c017-732c-284a3b20daf7@infradead.org>
@ 2020-05-19  8:01 ` Danil Kipnis
  2020-05-19  8:01   ` [PATCH 1/1] rnbd/rtrs: pass max segment size from blk user to the rdma library Danil Kipnis
                     ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Danil Kipnis @ 2020-05-19  8:01 UTC (permalink / raw)
  To: linux-rdma, jgg, linux-next
  Cc: jinpu.wang, dledford, axboe, linux-block, bvanassche, rdunlap,
	leon, Danil Kipnis

Hi Jason, Hi All,

this fixes the compilation problem reported by Randy Dunlap for RTRS on
rdma for-next.

Jason, am I even doing the right thing sending the fixes for the issues
reported for the for-next for RTRS/RNBD to here?

Danil Kipnis (1):
  rnbd/rtrs: pass max segment size from blk user to the rdma library

 drivers/block/rnbd/rnbd-clt.c          |  1 +
 drivers/infiniband/ulp/rtrs/rtrs-clt.c | 17 +++++++++++------
 drivers/infiniband/ulp/rtrs/rtrs-clt.h |  1 +
 drivers/infiniband/ulp/rtrs/rtrs.h     |  1 +
 4 files changed, 14 insertions(+), 6 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/1] rnbd/rtrs: pass max segment size from blk user to the rdma library
  2020-05-19  8:01 ` [PATCH 0/1] Fix RTRS compilation with block layer disabled Danil Kipnis
@ 2020-05-19  8:01   ` Danil Kipnis
  2020-05-19  8:48     ` Leon Romanovsky
  2020-05-19  8:45   ` [PATCH 0/1] Fix RTRS compilation with block layer disabled Leon Romanovsky
  2020-05-19 23:34   ` Jason Gunthorpe
  2 siblings, 1 reply; 12+ messages in thread
From: Danil Kipnis @ 2020-05-19  8:01 UTC (permalink / raw)
  To: linux-rdma, jgg, linux-next
  Cc: jinpu.wang, dledford, axboe, linux-block, bvanassche, rdunlap,
	leon, Danil Kipnis

When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
The rtrs is a transport library and should compile independently of the
block layer. The desired max segment size should be passed down by the
user.

Introduce max_segment_size parameter for the rtrs_clt_open() call.

Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
---
 drivers/block/rnbd/rnbd-clt.c          |  1 +
 drivers/infiniband/ulp/rtrs/rtrs-clt.c | 17 +++++++++++------
 drivers/infiniband/ulp/rtrs/rtrs-clt.h |  1 +
 drivers/infiniband/ulp/rtrs/rtrs.h     |  1 +
 4 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c
index 55bff3b1be71..450a571e6a1e 100644
--- a/drivers/block/rnbd/rnbd-clt.c
+++ b/drivers/block/rnbd/rnbd-clt.c
@@ -1216,6 +1216,7 @@ find_and_get_or_create_sess(const char *sessname,
 				   paths, path_cnt, port_nr,
 				   sizeof(struct rnbd_iu),
 				   RECONNECT_DELAY, BMAX_SEGMENTS,
+				   BLK_MAX_SEGMENT_SIZE,
 				   MAX_RECONNECTS);
 	if (IS_ERR(sess->rtrs)) {
 		err = PTR_ERR(sess->rtrs);
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index 0fa3a229d90e..59a36831927b 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -12,7 +12,6 @@
 
 #include <linux/module.h>
 #include <linux/rculist.h>
-#include <linux/blkdev.h> /* for BLK_MAX_SEGMENT_SIZE */
 
 #include "rtrs-clt.h"
 #include "rtrs-log.h"
@@ -1408,7 +1407,8 @@ static void rtrs_clt_close_work(struct work_struct *work);
 
 static struct rtrs_clt_sess *alloc_sess(struct rtrs_clt *clt,
 					 const struct rtrs_addr *path,
-					 size_t con_num, u16 max_segments)
+					 size_t con_num, u16 max_segments,
+					 size_t max_segment_size)
 {
 	struct rtrs_clt_sess *sess;
 	int err = -ENOMEM;
@@ -1445,7 +1445,7 @@ static struct rtrs_clt_sess *alloc_sess(struct rtrs_clt *clt,
 	strlcpy(sess->s.sessname, clt->sessname, sizeof(sess->s.sessname));
 	sess->s.con_num = con_num;
 	sess->clt = clt;
-	sess->max_pages_per_mr = max_segments * BLK_MAX_SEGMENT_SIZE >> 12;
+	sess->max_pages_per_mr = max_segments * max_segment_size >> 12;
 	init_waitqueue_head(&sess->state_wq);
 	sess->state = RTRS_CLT_CONNECTING;
 	atomic_set(&sess->connected_cnt, 0);
@@ -2531,6 +2531,7 @@ static struct rtrs_clt *alloc_clt(const char *sessname, size_t paths_num,
 				  void	(*link_ev)(void *priv,
 						   enum rtrs_clt_link_ev ev),
 				  unsigned int max_segments,
+				  size_t max_segment_size,
 				  unsigned int reconnect_delay_sec,
 				  unsigned int max_reconnect_attempts)
 {
@@ -2560,6 +2561,7 @@ static struct rtrs_clt *alloc_clt(const char *sessname, size_t paths_num,
 	clt->port = port;
 	clt->pdu_sz = pdu_sz;
 	clt->max_segments = max_segments;
+	clt->max_segment_size = max_segment_size;
 	clt->reconnect_delay_sec = reconnect_delay_sec;
 	clt->max_reconnect_attempts = max_reconnect_attempts;
 	clt->priv = priv;
@@ -2641,6 +2643,7 @@ static void free_clt(struct rtrs_clt *clt)
  * @pdu_sz: Size of extra payload which can be accessed after permit allocation.
  * @reconnect_delay_sec: time between reconnect tries
  * @max_segments: Max. number of segments per IO request
+ * @max_segment_size: Max. size of one segment
  * @max_reconnect_attempts: Number of times to reconnect on error before giving
  *			    up, 0 for * disabled, -1 for forever
  *
@@ -2655,6 +2658,7 @@ struct rtrs_clt *rtrs_clt_open(struct rtrs_clt_ops *ops,
 				 size_t paths_num, u16 port,
 				 size_t pdu_sz, u8 reconnect_delay_sec,
 				 u16 max_segments,
+				 size_t max_segment_size,
 				 s16 max_reconnect_attempts)
 {
 	struct rtrs_clt_sess *sess, *tmp;
@@ -2663,7 +2667,7 @@ struct rtrs_clt *rtrs_clt_open(struct rtrs_clt_ops *ops,
 
 	clt = alloc_clt(sessname, paths_num, port, pdu_sz, ops->priv,
 			ops->link_ev,
-			max_segments, reconnect_delay_sec,
+			max_segments, max_segment_size, reconnect_delay_sec,
 			max_reconnect_attempts);
 	if (IS_ERR(clt)) {
 		err = PTR_ERR(clt);
@@ -2673,7 +2677,7 @@ struct rtrs_clt *rtrs_clt_open(struct rtrs_clt_ops *ops,
 		struct rtrs_clt_sess *sess;
 
 		sess = alloc_sess(clt, &paths[i], nr_cpu_ids,
-				  max_segments);
+				  max_segments, max_segment_size);
 		if (IS_ERR(sess)) {
 			err = PTR_ERR(sess);
 			goto close_all_sess;
@@ -2923,7 +2927,8 @@ int rtrs_clt_create_path_from_sysfs(struct rtrs_clt *clt,
 	struct rtrs_clt_sess *sess;
 	int err;
 
-	sess = alloc_sess(clt, addr, nr_cpu_ids, clt->max_segments);
+	sess = alloc_sess(clt, addr, nr_cpu_ids, clt->max_segments,
+			  clt->max_segment_size);
 	if (IS_ERR(sess))
 		return PTR_ERR(sess);
 
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.h b/drivers/infiniband/ulp/rtrs/rtrs-clt.h
index 039a2ebba2f9..167acd3c90fc 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.h
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.h
@@ -164,6 +164,7 @@ struct rtrs_clt {
 	unsigned int		max_reconnect_attempts;
 	unsigned int		reconnect_delay_sec;
 	unsigned int		max_segments;
+	size_t			max_segment_size;
 	void			*permits;
 	unsigned long		*permits_map;
 	size_t			queue_depth;
diff --git a/drivers/infiniband/ulp/rtrs/rtrs.h b/drivers/infiniband/ulp/rtrs/rtrs.h
index 9879d40467b6..9af750f4d783 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs.h
+++ b/drivers/infiniband/ulp/rtrs/rtrs.h
@@ -58,6 +58,7 @@ struct rtrs_clt *rtrs_clt_open(struct rtrs_clt_ops *ops,
 				 size_t path_cnt, u16 port,
 				 size_t pdu_sz, u8 reconnect_delay_sec,
 				 u16 max_segments,
+				 size_t max_segment_size,
 				 s16 max_reconnect_attempts);
 
 void rtrs_clt_close(struct rtrs_clt *sess);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/1] Fix RTRS compilation with block layer disabled
  2020-05-19  8:01 ` [PATCH 0/1] Fix RTRS compilation with block layer disabled Danil Kipnis
  2020-05-19  8:01   ` [PATCH 1/1] rnbd/rtrs: pass max segment size from blk user to the rdma library Danil Kipnis
@ 2020-05-19  8:45   ` Leon Romanovsky
  2020-05-19 23:34   ` Jason Gunthorpe
  2 siblings, 0 replies; 12+ messages in thread
From: Leon Romanovsky @ 2020-05-19  8:45 UTC (permalink / raw)
  To: Danil Kipnis
  Cc: linux-rdma, jgg, linux-next, jinpu.wang, dledford, axboe,
	linux-block, bvanassche, rdunlap

On Tue, May 19, 2020 at 10:01:35AM +0200, Danil Kipnis wrote:
> Hi Jason, Hi All,
>
> this fixes the compilation problem reported by Randy Dunlap for RTRS on
> rdma for-next.
>
> Jason, am I even doing the right thing sending the fixes for the issues
> reported for the for-next for RTRS/RNBD to here?
>
> Danil Kipnis (1):
>   rnbd/rtrs: pass max segment size from blk user to the rdma library

Danil,

There is no need in cover letter for one patch.

Thanks

>
>  drivers/block/rnbd/rnbd-clt.c          |  1 +
>  drivers/infiniband/ulp/rtrs/rtrs-clt.c | 17 +++++++++++------
>  drivers/infiniband/ulp/rtrs/rtrs-clt.h |  1 +
>  drivers/infiniband/ulp/rtrs/rtrs.h     |  1 +
>  4 files changed, 14 insertions(+), 6 deletions(-)
>
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] rnbd/rtrs: pass max segment size from blk user to the rdma library
  2020-05-19  8:01   ` [PATCH 1/1] rnbd/rtrs: pass max segment size from blk user to the rdma library Danil Kipnis
@ 2020-05-19  8:48     ` Leon Romanovsky
  2020-05-19  9:14       ` Danil Kipnis
  2020-05-19 11:14       ` [PATCH v2] " Danil Kipnis
  0 siblings, 2 replies; 12+ messages in thread
From: Leon Romanovsky @ 2020-05-19  8:48 UTC (permalink / raw)
  To: Danil Kipnis
  Cc: linux-rdma, jgg, linux-next, jinpu.wang, dledford, axboe,
	linux-block, bvanassche, rdunlap

On Tue, May 19, 2020 at 10:01:36AM +0200, Danil Kipnis wrote:
> When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
> The rtrs is a transport library and should compile independently of the
> block layer. The desired max segment size should be passed down by the
> user.
>
> Introduce max_segment_size parameter for the rtrs_clt_open() call.
>
> Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> ---

Please, add fixes line.

Thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] rnbd/rtrs: pass max segment size from blk user to the rdma library
  2020-05-19  8:48     ` Leon Romanovsky
@ 2020-05-19  9:14       ` Danil Kipnis
  2020-05-19 15:42         ` Leon Romanovsky
  2020-05-19 11:14       ` [PATCH v2] " Danil Kipnis
  1 sibling, 1 reply; 12+ messages in thread
From: Danil Kipnis @ 2020-05-19  9:14 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: linux-rdma, Jason Gunthorpe, Linux Next Mailing List, Jinpu Wang,
	Doug Ledford, Jens Axboe, linux-block, Bart Van Assche,
	Randy Dunlap

Hi Leon

On Tue, May 19, 2020 at 10:48 AM Leon Romanovsky <leon@kernel.org> wrote:
>
> On Tue, May 19, 2020 at 10:01:36AM +0200, Danil Kipnis wrote:
> > When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
> > The rtrs is a transport library and should compile independently of the
> > block layer. The desired max segment size should be passed down by the
> > user.
> >
> > Introduce max_segment_size parameter for the rtrs_clt_open() call.
> >
> > Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > ---
>
> Please, add fixes line.
I'm new to this for-next fix up procedure. What tree the commit I
should reference with the fixes line should come from? Should I split
this commit so that I can reference the commits which add separate
files in the original patchset here
https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=for-next
? And also if I have to fix yet another issue - how do I then
reference the commit this patch creates if applied?
Thank you!

>
> Thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] rnbd/rtrs: pass max segment size from blk user to the rdma library
  2020-05-19  8:48     ` Leon Romanovsky
  2020-05-19  9:14       ` Danil Kipnis
@ 2020-05-19 11:14       ` Danil Kipnis
  2020-05-19 15:04         ` Randy Dunlap
  2020-05-19 23:44         ` Jason Gunthorpe
  1 sibling, 2 replies; 12+ messages in thread
From: Danil Kipnis @ 2020-05-19 11:14 UTC (permalink / raw)
  To: linux-block, linux-rdma, linux-next, axboe, dledford, jgg
  Cc: bvanassche, leon, danil.kipnis, jinpu.wang, rdunlap

When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
The rtrs is a transport library and should compile independently of the
block layer. The desired max segment size should be passed down by the
user.

Introduce max_segment_size parameter for the rtrs_clt_open() call.

Fixes: f7a7a5c228d4 ("block/rnbd: client: main functionality")
Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
Fixes: cb80329c9434 ("RDMA/rtrs: client: private header with client structs and functions")
Fixes: b5c27cdb094e ("RDMA/rtrs: public interface header to establish RDMA connections")

Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
---
v1->v2 Add Fixes lines.

 drivers/block/rnbd/rnbd-clt.c          |  1 +
 drivers/infiniband/ulp/rtrs/rtrs-clt.c | 17 +++++++++++------
 drivers/infiniband/ulp/rtrs/rtrs-clt.h |  1 +
 drivers/infiniband/ulp/rtrs/rtrs.h     |  1 +
 4 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/block/rnbd/rnbd-clt.c b/drivers/block/rnbd/rnbd-clt.c
index 55bff3b1be71..450a571e6a1e 100644
--- a/drivers/block/rnbd/rnbd-clt.c
+++ b/drivers/block/rnbd/rnbd-clt.c
@@ -1216,6 +1216,7 @@ find_and_get_or_create_sess(const char *sessname,
 				   paths, path_cnt, port_nr,
 				   sizeof(struct rnbd_iu),
 				   RECONNECT_DELAY, BMAX_SEGMENTS,
+				   BLK_MAX_SEGMENT_SIZE,
 				   MAX_RECONNECTS);
 	if (IS_ERR(sess->rtrs)) {
 		err = PTR_ERR(sess->rtrs);
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index 468fdd0d8713..b2e465ad4423 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -12,7 +12,6 @@
 
 #include <linux/module.h>
 #include <linux/rculist.h>
-#include <linux/blkdev.h> /* for BLK_MAX_SEGMENT_SIZE */
 
 #include "rtrs-clt.h"
 #include "rtrs-log.h"
@@ -1407,7 +1406,8 @@ static void rtrs_clt_close_work(struct work_struct *work);
 
 static struct rtrs_clt_sess *alloc_sess(struct rtrs_clt *clt,
 					 const struct rtrs_addr *path,
-					 size_t con_num, u16 max_segments)
+					 size_t con_num, u16 max_segments,
+					 size_t max_segment_size)
 {
 	struct rtrs_clt_sess *sess;
 	int err = -ENOMEM;
@@ -1444,7 +1444,7 @@ static struct rtrs_clt_sess *alloc_sess(struct rtrs_clt *clt,
 	strlcpy(sess->s.sessname, clt->sessname, sizeof(sess->s.sessname));
 	sess->s.con_num = con_num;
 	sess->clt = clt;
-	sess->max_pages_per_mr = max_segments * BLK_MAX_SEGMENT_SIZE >> 12;
+	sess->max_pages_per_mr = max_segments * max_segment_size >> 12;
 	init_waitqueue_head(&sess->state_wq);
 	sess->state = RTRS_CLT_CONNECTING;
 	atomic_set(&sess->connected_cnt, 0);
@@ -2530,6 +2530,7 @@ static struct rtrs_clt *alloc_clt(const char *sessname, size_t paths_num,
 				  void	(*link_ev)(void *priv,
 						   enum rtrs_clt_link_ev ev),
 				  unsigned int max_segments,
+				  size_t max_segment_size,
 				  unsigned int reconnect_delay_sec,
 				  unsigned int max_reconnect_attempts)
 {
@@ -2559,6 +2560,7 @@ static struct rtrs_clt *alloc_clt(const char *sessname, size_t paths_num,
 	clt->port = port;
 	clt->pdu_sz = pdu_sz;
 	clt->max_segments = max_segments;
+	clt->max_segment_size = max_segment_size;
 	clt->reconnect_delay_sec = reconnect_delay_sec;
 	clt->max_reconnect_attempts = max_reconnect_attempts;
 	clt->priv = priv;
@@ -2640,6 +2642,7 @@ static void free_clt(struct rtrs_clt *clt)
  * @pdu_sz: Size of extra payload which can be accessed after permit allocation.
  * @reconnect_delay_sec: time between reconnect tries
  * @max_segments: Max. number of segments per IO request
+ * @max_segment_size: Max. size of one segment
  * @max_reconnect_attempts: Number of times to reconnect on error before giving
  *			    up, 0 for * disabled, -1 for forever
  *
@@ -2654,6 +2657,7 @@ struct rtrs_clt *rtrs_clt_open(struct rtrs_clt_ops *ops,
 				 size_t paths_num, u16 port,
 				 size_t pdu_sz, u8 reconnect_delay_sec,
 				 u16 max_segments,
+				 size_t max_segment_size,
 				 s16 max_reconnect_attempts)
 {
 	struct rtrs_clt_sess *sess, *tmp;
@@ -2662,7 +2666,7 @@ struct rtrs_clt *rtrs_clt_open(struct rtrs_clt_ops *ops,
 
 	clt = alloc_clt(sessname, paths_num, port, pdu_sz, ops->priv,
 			ops->link_ev,
-			max_segments, reconnect_delay_sec,
+			max_segments, max_segment_size, reconnect_delay_sec,
 			max_reconnect_attempts);
 	if (IS_ERR(clt)) {
 		err = PTR_ERR(clt);
@@ -2672,7 +2676,7 @@ struct rtrs_clt *rtrs_clt_open(struct rtrs_clt_ops *ops,
 		struct rtrs_clt_sess *sess;
 
 		sess = alloc_sess(clt, &paths[i], nr_cpu_ids,
-				  max_segments);
+				  max_segments, max_segment_size);
 		if (IS_ERR(sess)) {
 			err = PTR_ERR(sess);
 			goto close_all_sess;
@@ -2921,7 +2925,8 @@ int rtrs_clt_create_path_from_sysfs(struct rtrs_clt *clt,
 	struct rtrs_clt_sess *sess;
 	int err;
 
-	sess = alloc_sess(clt, addr, nr_cpu_ids, clt->max_segments);
+	sess = alloc_sess(clt, addr, nr_cpu_ids, clt->max_segments,
+			  clt->max_segment_size);
 	if (IS_ERR(sess))
 		return PTR_ERR(sess);
 
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.h b/drivers/infiniband/ulp/rtrs/rtrs-clt.h
index 039a2ebba2f9..167acd3c90fc 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.h
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.h
@@ -164,6 +164,7 @@ struct rtrs_clt {
 	unsigned int		max_reconnect_attempts;
 	unsigned int		reconnect_delay_sec;
 	unsigned int		max_segments;
+	size_t			max_segment_size;
 	void			*permits;
 	unsigned long		*permits_map;
 	size_t			queue_depth;
diff --git a/drivers/infiniband/ulp/rtrs/rtrs.h b/drivers/infiniband/ulp/rtrs/rtrs.h
index 9879d40467b6..9af750f4d783 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs.h
+++ b/drivers/infiniband/ulp/rtrs/rtrs.h
@@ -58,6 +58,7 @@ struct rtrs_clt *rtrs_clt_open(struct rtrs_clt_ops *ops,
 				 size_t path_cnt, u16 port,
 				 size_t pdu_sz, u8 reconnect_delay_sec,
 				 u16 max_segments,
+				 size_t max_segment_size,
 				 s16 max_reconnect_attempts);
 
 void rtrs_clt_close(struct rtrs_clt *sess);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] rnbd/rtrs: pass max segment size from blk user to the rdma library
  2020-05-19 11:14       ` [PATCH v2] " Danil Kipnis
@ 2020-05-19 15:04         ` Randy Dunlap
  2020-05-19 23:44         ` Jason Gunthorpe
  1 sibling, 0 replies; 12+ messages in thread
From: Randy Dunlap @ 2020-05-19 15:04 UTC (permalink / raw)
  To: Danil Kipnis, linux-block, linux-rdma, linux-next, axboe, dledford, jgg
  Cc: bvanassche, leon, jinpu.wang

On 5/19/20 4:14 AM, Danil Kipnis wrote:
> When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
> The rtrs is a transport library and should compile independently of the
> block layer. The desired max segment size should be passed down by the
> user.
> 
> Introduce max_segment_size parameter for the rtrs_clt_open() call.
> 
> Fixes: f7a7a5c228d4 ("block/rnbd: client: main functionality")
> Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
> Fixes: cb80329c9434 ("RDMA/rtrs: client: private header with client structs and functions")
> Fixes: b5c27cdb094e ("RDMA/rtrs: public interface header to establish RDMA connections")
> 
> Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
> v1->v2 Add Fixes lines.
> 
>  drivers/block/rnbd/rnbd-clt.c          |  1 +
>  drivers/infiniband/ulp/rtrs/rtrs-clt.c | 17 +++++++++++------
>  drivers/infiniband/ulp/rtrs/rtrs-clt.h |  1 +
>  drivers/infiniband/ulp/rtrs/rtrs.h     |  1 +
>  4 files changed, 14 insertions(+), 6 deletions(-)


-- 
~Randy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/1] rnbd/rtrs: pass max segment size from blk user to the rdma library
  2020-05-19  9:14       ` Danil Kipnis
@ 2020-05-19 15:42         ` Leon Romanovsky
  0 siblings, 0 replies; 12+ messages in thread
From: Leon Romanovsky @ 2020-05-19 15:42 UTC (permalink / raw)
  To: Danil Kipnis
  Cc: linux-rdma, Jason Gunthorpe, Linux Next Mailing List, Jinpu Wang,
	Doug Ledford, Jens Axboe, linux-block, Bart Van Assche,
	Randy Dunlap

On Tue, May 19, 2020 at 11:14:26AM +0200, Danil Kipnis wrote:
> Hi Leon
>
> On Tue, May 19, 2020 at 10:48 AM Leon Romanovsky <leon@kernel.org> wrote:
> >
> > On Tue, May 19, 2020 at 10:01:36AM +0200, Danil Kipnis wrote:
> > > When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
> > > The rtrs is a transport library and should compile independently of the
> > > block layer. The desired max segment size should be passed down by the
> > > user.
> > >
> > > Introduce max_segment_size parameter for the rtrs_clt_open() call.
> > >
> > > Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
> > > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > > ---
> >
> > Please, add fixes line.
> I'm new to this for-next fix up procedure. What tree the commit I
> should reference with the fixes line should come from? Should I split
> this commit so that I can reference the commits which add separate
> files in the original patchset here
> https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=for-next
> ? And also if I have to fix yet another issue - how do I then
> reference the commit this patch creates if applied?
> Thank you!

NP,

You need to configure your email client to properly honor replies,
e.g. add extra blank line between your reply and the email body.
It will make your replies more clear.

Regarding fixes:
1. There should not blank line between Fixes line and SOBs.
2. You can use one Fixes line (use latest).
3. Patches are usually divided for logical units.

Thanks

>
> >
> > Thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/1] Fix RTRS compilation with block layer disabled
  2020-05-19  8:01 ` [PATCH 0/1] Fix RTRS compilation with block layer disabled Danil Kipnis
  2020-05-19  8:01   ` [PATCH 1/1] rnbd/rtrs: pass max segment size from blk user to the rdma library Danil Kipnis
  2020-05-19  8:45   ` [PATCH 0/1] Fix RTRS compilation with block layer disabled Leon Romanovsky
@ 2020-05-19 23:34   ` Jason Gunthorpe
  2 siblings, 0 replies; 12+ messages in thread
From: Jason Gunthorpe @ 2020-05-19 23:34 UTC (permalink / raw)
  To: Danil Kipnis
  Cc: linux-rdma, linux-next, jinpu.wang, dledford, axboe, linux-block,
	bvanassche, rdunlap, leon

On Tue, May 19, 2020 at 10:01:35AM +0200, Danil Kipnis wrote:
> Hi Jason, Hi All,
> 
> this fixes the compilation problem reported by Randy Dunlap for RTRS on
> rdma for-next.
> 
> Jason, am I even doing the right thing sending the fixes for the issues
> reported for the for-next for RTRS/RNBD to here?

Yes, I will take them.

Do not send cover letters for single patches please

Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] rnbd/rtrs: pass max segment size from blk user to the rdma library
  2020-05-19 11:14       ` [PATCH v2] " Danil Kipnis
  2020-05-19 15:04         ` Randy Dunlap
@ 2020-05-19 23:44         ` Jason Gunthorpe
  2020-05-21 16:12           ` Randy Dunlap
  1 sibling, 1 reply; 12+ messages in thread
From: Jason Gunthorpe @ 2020-05-19 23:44 UTC (permalink / raw)
  To: Danil Kipnis
  Cc: linux-block, linux-rdma, linux-next, axboe, dledford, bvanassche,
	leon, jinpu.wang, rdunlap

On Tue, May 19, 2020 at 01:14:19PM +0200, Danil Kipnis wrote:
> When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
> The rtrs is a transport library and should compile independently of the
> block layer. The desired max segment size should be passed down by the
> user.
> 
> Introduce max_segment_size parameter for the rtrs_clt_open() call.
> 
> Fixes: f7a7a5c228d4 ("block/rnbd: client: main functionality")
> Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
> Fixes: cb80329c9434 ("RDMA/rtrs: client: private header with client structs and functions")
> Fixes: b5c27cdb094e ("RDMA/rtrs: public interface header to establish RDMA connections")
> 
> Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> ---
> v1->v2 Add Fixes lines.

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] rnbd/rtrs: pass max segment size from blk user to the rdma library
  2020-05-19 23:44         ` Jason Gunthorpe
@ 2020-05-21 16:12           ` Randy Dunlap
  2020-05-21 20:00             ` Jason Gunthorpe
  0 siblings, 1 reply; 12+ messages in thread
From: Randy Dunlap @ 2020-05-21 16:12 UTC (permalink / raw)
  To: Jason Gunthorpe, Danil Kipnis
  Cc: linux-block, linux-rdma, linux-next, axboe, dledford, bvanassche,
	leon, jinpu.wang

On 5/19/20 4:44 PM, Jason Gunthorpe wrote:
> On Tue, May 19, 2020 at 01:14:19PM +0200, Danil Kipnis wrote:
>> When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
>> The rtrs is a transport library and should compile independently of the
>> block layer. The desired max segment size should be passed down by the
>> user.
>>
>> Introduce max_segment_size parameter for the rtrs_clt_open() call.
>>
>> Fixes: f7a7a5c228d4 ("block/rnbd: client: main functionality")
>> Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
>> Fixes: cb80329c9434 ("RDMA/rtrs: client: private header with client structs and functions")
>> Fixes: b5c27cdb094e ("RDMA/rtrs: public interface header to establish RDMA connections")
>>
>> Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
>> Reported-by: Randy Dunlap <rdunlap@infradead.org>
>> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
>> ---
>> v1->v2 Add Fixes lines.
> 
> Applied to for-next, thanks

Hi Jason,

Does your "for-next" feed into linux-next?
I am still seeing this build error today (linux-next 20200521).

thanks.
-- 
~Randy


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] rnbd/rtrs: pass max segment size from blk user to the rdma library
  2020-05-21 16:12           ` Randy Dunlap
@ 2020-05-21 20:00             ` Jason Gunthorpe
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Gunthorpe @ 2020-05-21 20:00 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Danil Kipnis, linux-block, linux-rdma, linux-next, axboe,
	dledford, bvanassche, leon, jinpu.wang

On Thu, May 21, 2020 at 09:12:59AM -0700, Randy Dunlap wrote:
> On 5/19/20 4:44 PM, Jason Gunthorpe wrote:
> > On Tue, May 19, 2020 at 01:14:19PM +0200, Danil Kipnis wrote:
> >> When Block Device Layer is disabled, BLK_MAX_SEGMENT_SIZE is undefined.
> >> The rtrs is a transport library and should compile independently of the
> >> block layer. The desired max segment size should be passed down by the
> >> user.
> >>
> >> Introduce max_segment_size parameter for the rtrs_clt_open() call.
> >>
> >> Fixes: f7a7a5c228d4 ("block/rnbd: client: main functionality")
> >> Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
> >> Fixes: cb80329c9434 ("RDMA/rtrs: client: private header with client structs and functions")
> >> Fixes: b5c27cdb094e ("RDMA/rtrs: public interface header to establish RDMA connections")
> >>
> >> Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
> >> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> >> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> >> v1->v2 Add Fixes lines.
> > 
> > Applied to for-next, thanks
> 
> Hi Jason,
> 
> Does your "for-next" feed into linux-next?
> I am still seeing this build error today (linux-next 20200521).

Yes, it is usually delayed a bit. It should be there tomorrow

Thanks,
Jason

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-05-21 20:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <e132ee19-ff55-c017-732c-284a3b20daf7@infradead.org>
2020-05-19  8:01 ` [PATCH 0/1] Fix RTRS compilation with block layer disabled Danil Kipnis
2020-05-19  8:01   ` [PATCH 1/1] rnbd/rtrs: pass max segment size from blk user to the rdma library Danil Kipnis
2020-05-19  8:48     ` Leon Romanovsky
2020-05-19  9:14       ` Danil Kipnis
2020-05-19 15:42         ` Leon Romanovsky
2020-05-19 11:14       ` [PATCH v2] " Danil Kipnis
2020-05-19 15:04         ` Randy Dunlap
2020-05-19 23:44         ` Jason Gunthorpe
2020-05-21 16:12           ` Randy Dunlap
2020-05-21 20:00             ` Jason Gunthorpe
2020-05-19  8:45   ` [PATCH 0/1] Fix RTRS compilation with block layer disabled Leon Romanovsky
2020-05-19 23:34   ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).