linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jinpu Wang <jinpu.wang@ionos.com>
Cc: Guoqing Jiang <guoqing.jiang@linux.dev>,
	haris.iqbal@ionos.com, axboe@kernel.dk, jgg@ziepe.ca,
	linux-block@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] rnbd-srv: remove 'dir' argument from rnbd_srv_rdma_ev
Date: Tue, 30 Aug 2022 11:44:00 +0300	[thread overview]
Message-ID: <Yw3N0ALRz5xcBunA@unreal> (raw)
In-Reply-To: <CAMGffE=-Dsr=s1X=00+y1UcOhHC=FJ-9guQAWTDoHLTRBQ7Qaw@mail.gmail.com>

On Mon, Aug 29, 2022 at 03:43:43PM +0200, Jinpu Wang wrote:
> On Mon, Aug 29, 2022 at 3:33 PM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
> >
> >
> >
> > On 8/29/22 3:44 PM, Leon Romanovsky wrote:
> > > On Fri, Aug 26, 2022 at 04:11:17PM +0800, Guoqing Jiang wrote:
> > >> Since all callers (process_{read,write}) set id->dir, no need to
> > >> pass 'dir' again.
> > >>
> > >> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> > >> ---
> > >>   drivers/block/rnbd/rnbd-srv.c          | 9 ++++-----
> > >>   drivers/block/rnbd/rnbd-srv.h          | 1 +
> > >>   drivers/infiniband/ulp/rtrs/rtrs-srv.c | 4 ++--
> > >>   drivers/infiniband/ulp/rtrs/rtrs.h     | 3 +--
> > >>   4 files changed, 8 insertions(+), 9 deletions(-)
> >
> > > I applied the patch and cleanup of rtrs-srv.h can be done later.
> >
> > Thanks! I suppose below
> >
> > > So decouple it from rtrs-srv.h and hide everything that not-needed to be
> > > exported to separate header file.
> >
> > means move 'struct rtrs_srv_op' to rtrs.h, which seems not appropriate to me
> > because both client and server include the header. Pls correct me if I
> > am wrong.
> >
> > Since process_{read,write} prints direction info if ctx->ops.rdma_ev
> > fails, how
> > about remove the 'dir' info from rnbd_srv_rdma_ev? Then we  don't need to
> > include rtrs-srv.h.
> >
> > diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c
> > index 431c6da19d3f..d07ff3ba560c 100644
> > --- a/drivers/block/rnbd/rnbd-srv.c
> > +++ b/drivers/block/rnbd/rnbd-srv.c
> > @@ -387,8 +387,8 @@ static int rnbd_srv_rdma_ev(void *priv, struct
> > rtrs_srv_op *id,
> >                                              datalen);
> >                  break;
> >          default:
> > -               pr_warn("Received unexpected message type %d with dir %d
> > from session %s\n",
> > -                       type, id->dir, srv_sess->sessname);
> > +               pr_warn("Received unexpected message type %d from
> > session %s\n",
> > +                       type, srv_sess->sessname);
> >                  return -EINVAL;
> >          }
> >
> > diff --git a/drivers/block/rnbd/rnbd-srv.h b/drivers/block/rnbd/rnbd-srv.h
> > index 5a0ef6c2b5c7..081bceaf4ae9 100644
> > --- a/drivers/block/rnbd/rnbd-srv.h
> > +++ b/drivers/block/rnbd/rnbd-srv.h
> > @@ -14,7 +14,6 @@
> >   #include <linux/kref.h>
> >
> >   #include <rtrs.h>
> > -#include <rtrs-srv.h>
> >   #include "rnbd-proto.h"
> >   #include "rnbd-log.h"
> >
> >
> > Thoughts?
> I like the idea. Please post a formal patch based on leon's
> https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=wip/leon-for-next

I squashed this hunk into original patch.

Thanks

> 
> Thx!
> >
> > Thanks,
> > Guoqing

  reply	other threads:[~2022-08-30  8:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26  8:11 [PATCH] rnbd-srv: remove 'dir' argument from rnbd_srv_rdma_ev Guoqing Jiang
2022-08-26 10:48 ` Jinpu Wang
2022-08-26 11:26   ` Guoqing Jiang
2022-08-26 11:29     ` Jinpu Wang
2022-08-26 11:38       ` Guoqing Jiang
2022-08-26 11:58         ` Jinpu Wang
2022-08-26 14:01           ` Guoqing Jiang
2022-08-29 11:12             ` Jinpu Wang
2022-08-28 11:27       ` Leon Romanovsky
2022-08-29  7:44 ` Leon Romanovsky
2022-08-29 13:33   ` Guoqing Jiang
2022-08-29 13:43     ` Jinpu Wang
2022-08-30  8:44       ` Leon Romanovsky [this message]
2022-08-30  8:57         ` Guoqing Jiang
2022-08-30  9:15           ` Leon Romanovsky
2022-08-30  9:00         ` Jinpu Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yw3N0ALRz5xcBunA@unreal \
    --to=leon@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=guoqing.jiang@linux.dev \
    --cc=haris.iqbal@ionos.com \
    --cc=jgg@ziepe.ca \
    --cc=jinpu.wang@ionos.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).