[Stgt-devel] ibmvio - rdma error
FUJITA Tomonori
fujita.tomonori
Fri Apr 6 18:38:57 CEST 2007
From: Bastian Blank <waldi at berlios.de>
Subject: Re: [Stgt-devel] ibmvio - rdma error
Date: Fri, 6 Apr 2007 18:13:05 +0200
> On Sat, Apr 07, 2007 at 12:36:04AM +0900, FUJITA Tomonori wrote:
> > diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
> > index a7fbd10..46f9ca1 100644
> > --- a/drivers/scsi/ibmvscsi/ibmvstgt.c
> > +++ b/drivers/scsi/ibmvscsi/ibmvstgt.c
> > @@ -35,7 +35,7 @@
> > #include "ibmvscsi.h"
> >
> > #define INITIAL_SRP_LIMIT 16
> > -#define DEFAULT_MAX_SECTORS 512
> > +#define DEFAULT_MAX_SECTORS 128
>
> 256, not 128.
Are you sure 256 should work though it seems to work? We know 128
works. If you definitely sure (e.g. you read the IBM document), I'm
happy to use 256.
> > - if (sc->result != SAM_STAT_GOOD) {
> > + if (err|| sc->result != SAM_STAT_GOOD) {
>
> coding style?
>
> > @@ -508,7 +509,6 @@ static void process_iu(struct viosrp_crq *crq, struct srp_target *target)
> >
> > if (err != H_SUCCESS) {
> > eprintk("%ld transferring data error %p\n", err, iue);
> > - done = 1;
> > goto out;
> > }
>
> Replace that with:
> if (err != H_SUCCESS)
> eprintk("%ld transferring data error %p\n", err, iue);
> else if (crq->format == VIOSRP_MAD_FORMAT)
> done = process_mad_iu(iue);
> else
> done = process_srp_iu(iue);
>
> if (done)
> srp_iu_put(iue);
>
> No more goto.
I think that using goto for an error path is common in Linux kernel
(and simple).
> Revised patch attached.
>
> Signed-off-by: Bastian Blank <bastian at waldi.eu.org>
OK, thanks.
More information about the stgt
mailing list