* [REGRESSION] 4.9-rc4+ doesn't boot on my test box
@ 2016-11-08 17:42 Jens Axboe
2016-11-08 23:15 ` Martin K. Petersen
0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2016-11-08 17:42 UTC (permalink / raw)
To: linux-scsi; +Cc: Kashyap Desai, Martin K. Petersen
Hi,
I wasted half a day on this, thinking it was something in my 4.10
branches. But it turns out it is not, the regression is in mainline.
Looking at the recent fixes, turns out to be this one:
commit 1e793f6fc0db920400574211c48f9157a37e3945
Author: Kashyap Desai <kashyap.desai@broadcom.com>
Date: Fri Oct 21 06:33:32 2016 -0700
scsi: megaraid_sas: Fix data integrity failure for JBOD
(passthrough) devices
If I revert that, box boots fine again. The effect of the regression is
that my box detects tons of SCSI devices (literally, thousands):
[ 11.675834] sd 0:2:0:0: [sda] Sector size 0 reported, assuming 512.
[ 11.675840] sd 0:2:0:0: Attached scsi generic sg0 type 0
[ 11.676096] sd 0:2:1:0: Attached scsi generic sg1 type 0
[ 11.676099] sd 0:2:1:0: [sdb] Sector size 0 reported, assuming 512.
[ 11.676105] sd 0:2:1:0: [sdb] 1 512-byte logical blocks: (512 B/512 B)
[ 11.676107] sd 0:2:1:0: [sdb] 0-byte physical blocks
[ 11.676132] sd 0:2:1:0: [sdb] Write Protect is off
[ 11.676170] sd 0:2:1:0: [sdb] Asking for cache data failed
[ 11.676173] sd 0:2:1:0: [sdb] Assuming drive cache: write through
[ 11.676410] sd 0:2:2:0: Attached scsi generic sg2 type 0
[ 11.676432] sd 0:2:2:0: [sdc] Sector size 0 reported, assuming 512.
[ 11.676435] sd 0:2:2:0: [sdc] 1 512-byte logical blocks: (512 B/512 B)
[ 11.676438] sd 0:2:2:0: [sdc] 0-byte physical blocks
[ 11.676442] sd 0:2:1:0: [sdb] Sector size 0 reported, assuming 512.
[ 11.676454] sd 0:2:2:0: [sdc] Write Protect is off
[ 11.676476] sd 0:2:2:0: [sdc] Asking for cache data failed
[ 11.676478] sd 0:2:2:0: [sdc] Assuming drive cache: write through
[...]
[ 11.717641] sd 0:3:63:0: Attached scsi generic sg127 type 0
[ 11.717757] sd 0:3:62:0: [sddw] Sector size 0 reported, assuming 512.
[ 11.717801] sd 0:3:63:0: [sddx] Sector size 0 reported, assuming 512.
[ 11.717802] sd 0:3:62:0: [sddw] Attached SCSI disk
[ 11.718011] sd 0:3:63:0: [sddx] Sector size 0 reported, assuming 512.
where a normal boots just detects sda and the CD-ROM:
[ 10.398120] sd 0:2:0:0: Attached scsi generic sg0 type 0
[ 10.398369] sd 0:2:0:0: [sda] 975699968 512-byte logical blocks: (500
GB/465 GiB)
[ 10.398684] sd 0:2:0:0: [sda] Write Protect is off
[ 10.398872] sd 0:2:0:0: [sda] Write cache: disabled, read cache:
enabled, supports DPO and FUA
[ 10.435084] sda: sda1 sda2 < sda5 sda6 > sda3
[ 10.437522] scsi 5:0:0:0: CD-ROM TEAC DVD-ROM DV-28SW
R.2B PQ: 0 ANSI: 5
[ 10.456582] sd 0:2:0:0: [sda] Attached SCSI disk
[ 10.500499] sr 5:0:0:0: [sr0] scsi3-mmc drive: 24x/24x cd/rw xa/form2
cdda tray
[ 10.508830] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 10.515186] sr 5:0:0:0: Attached scsi generic sg1 type 5
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [REGRESSION] 4.9-rc4+ doesn't boot on my test box
2016-11-08 17:42 [REGRESSION] 4.9-rc4+ doesn't boot on my test box Jens Axboe
@ 2016-11-08 23:15 ` Martin K. Petersen
2016-11-09 0:20 ` Kashyap Desai
0 siblings, 1 reply; 6+ messages in thread
From: Martin K. Petersen @ 2016-11-08 23:15 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-scsi, Kashyap Desai, Martin K. Petersen
>>>>> "Jens" == Jens Axboe <axboe@kernel.dk> writes:
Jens> I wasted half a day on this, thinking it was something in my
Jens> 4.10 branches. But it turns out it is not, the regression is in
Jens> mainline.
Kashyap, have you tested the stable fix without the remainder of the
driver update in place?
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [REGRESSION] 4.9-rc4+ doesn't boot on my test box
2016-11-08 23:15 ` Martin K. Petersen
@ 2016-11-09 0:20 ` Kashyap Desai
2016-11-09 1:19 ` Jens Axboe
0 siblings, 1 reply; 6+ messages in thread
From: Kashyap Desai @ 2016-11-09 0:20 UTC (permalink / raw)
To: Martin K. Petersen, Jens Axboe; +Cc: linux-scsi
> -----Original Message-----
> From: Martin K. Petersen [mailto:martin.petersen@oracle.com]
> Sent: Wednesday, November 09, 2016 4:45 AM
> To: Jens Axboe
> Cc: linux-scsi; Kashyap Desai; Martin K. Petersen
> Subject: Re: [REGRESSION] 4.9-rc4+ doesn't boot on my test box
>
> >>>>> "Jens" == Jens Axboe <axboe@kernel.dk> writes:
>
> Jens> I wasted half a day on this, thinking it was something in my
> Jens> 4.10 branches. But it turns out it is not, the regression is in
> Jens> mainline.
Jens -
Sorry for trouble. I did not validated this single patch. I validated
complete patch set.
Issue is improper MACRO usage MEGASAS_IS_LOGICAL, which gives incorrect
check condition in qcmd Path.
Below is proposed fix.
diff --git a/drivers/scsi/megaraid/megaraid_sas.h
b/drivers/scsi/megaraid/megaraid_sas.h
index 74c7b44..0d2625b 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -2236,7 +2236,7 @@ struct megasas_instance_template {
};
#define MEGASAS_IS_LOGICAL(scp)
\
- (scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1
+ ((scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1)
#define MEGASAS_DEV_INDEX(scp) \
(((scp->device->channel % 2) * MEGASAS_MAX_DEV_PER_CHANNEL) + \
>
> Kashyap, have you tested the stable fix without the remainder of the
driver
> update in place?
Martin - I validated whole series. Apologies for this.
Please help me to know how to fix this ? Do I need to send only fix on top
of latest commit (as posted above - MACRO definition) for this issue ?
>
> --
> Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [REGRESSION] 4.9-rc4+ doesn't boot on my test box
2016-11-09 0:20 ` Kashyap Desai
@ 2016-11-09 1:19 ` Jens Axboe
2016-11-09 2:14 ` Kashyap Desai
0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2016-11-09 1:19 UTC (permalink / raw)
To: Kashyap Desai, Martin K. Petersen; +Cc: linux-scsi
On 11/08/2016 05:20 PM, Kashyap Desai wrote:
>> -----Original Message-----
>> From: Martin K. Petersen [mailto:martin.petersen@oracle.com]
>> Sent: Wednesday, November 09, 2016 4:45 AM
>> To: Jens Axboe
>> Cc: linux-scsi; Kashyap Desai; Martin K. Petersen
>> Subject: Re: [REGRESSION] 4.9-rc4+ doesn't boot on my test box
>>
>>>>>>> "Jens" == Jens Axboe <axboe@kernel.dk> writes:
>>
>> Jens> I wasted half a day on this, thinking it was something in my
>> Jens> 4.10 branches. But it turns out it is not, the regression is in
>> Jens> mainline.
>
> Jens -
>
> Sorry for trouble. I did not validated this single patch. I validated
> complete patch set.
> Issue is improper MACRO usage MEGASAS_IS_LOGICAL, which gives incorrect
> check condition in qcmd Path.
>
> Below is proposed fix.
>
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas.h
> b/drivers/scsi/megaraid/megaraid_sas.h
> index 74c7b44..0d2625b 100644
> --- a/drivers/scsi/megaraid/megaraid_sas.h
> +++ b/drivers/scsi/megaraid/megaraid_sas.h
> @@ -2236,7 +2236,7 @@ struct megasas_instance_template {
> };
>
> #define MEGASAS_IS_LOGICAL(scp)
> \
> - (scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1
Ugh... So we're completing everything immediately.
> Martin - I validated whole series. Apologies for this.
>
> Please help me to know how to fix this ? Do I need to send only fix on top
> of latest commit (as posted above - MACRO definition) for this issue ?
Send a fix on top of current -git asap. The current tree is completely
broken for any megaraid user. -rc4 is no time to send in untested
patches, especially not something that claims to fix a 9 year old bug
and is marked for stable as well.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: [REGRESSION] 4.9-rc4+ doesn't boot on my test box
2016-11-09 1:19 ` Jens Axboe
@ 2016-11-09 2:14 ` Kashyap Desai
2016-11-09 2:28 ` Martin K. Petersen
0 siblings, 1 reply; 6+ messages in thread
From: Kashyap Desai @ 2016-11-09 2:14 UTC (permalink / raw)
To: Jens Axboe, Martin K. Petersen; +Cc: linux-scsi
> -----Original Message-----
> From: Jens Axboe [mailto:axboe@kernel.dk]
> Sent: Wednesday, November 09, 2016 6:50 AM
> To: Kashyap Desai; Martin K. Petersen
> Cc: linux-scsi
> Subject: Re: [REGRESSION] 4.9-rc4+ doesn't boot on my test box
>
> On 11/08/2016 05:20 PM, Kashyap Desai wrote:
> >> -----Original Message-----
> >> From: Martin K. Petersen [mailto:martin.petersen@oracle.com]
> >> Sent: Wednesday, November 09, 2016 4:45 AM
> >> To: Jens Axboe
> >> Cc: linux-scsi; Kashyap Desai; Martin K. Petersen
> >> Subject: Re: [REGRESSION] 4.9-rc4+ doesn't boot on my test box
> >>
> >>>>>>> "Jens" == Jens Axboe <axboe@kernel.dk> writes:
> >>
> >> Jens> I wasted half a day on this, thinking it was something in my
> >> Jens> 4.10 branches. But it turns out it is not, the regression is in
> >> Jens> mainline.
> >
> > Jens -
> >
> > Sorry for trouble. I did not validated this single patch. I validated
> > complete patch set.
> > Issue is improper MACRO usage MEGASAS_IS_LOGICAL, which gives
> > incorrect check condition in qcmd Path.
> >
> > Below is proposed fix.
> >
> >
> > diff --git a/drivers/scsi/megaraid/megaraid_sas.h
> > b/drivers/scsi/megaraid/megaraid_sas.h
> > index 74c7b44..0d2625b 100644
> > --- a/drivers/scsi/megaraid/megaraid_sas.h
> > +++ b/drivers/scsi/megaraid/megaraid_sas.h
> > @@ -2236,7 +2236,7 @@ struct megasas_instance_template { };
> >
> > #define MEGASAS_IS_LOGICAL(scp)
> > \
> > - (scp->device->channel < MEGASAS_MAX_PD_CHANNELS) ? 0 : 1
>
> Ugh... So we're completing everything immediately.
>
> > Martin - I validated whole series. Apologies for this.
> >
> > Please help me to know how to fix this ? Do I need to send only fix on
> > top of latest commit (as posted above - MACRO definition) for this issue
> > ?
>
> Send a fix on top of current -git asap. The current tree is completely
> broken for
> any megaraid user. -rc4 is no time to send in untested patches, especially
> not
> something that claims to fix a 9 year old bug and is marked for stable as
> well.
I will run some more test (using patch set only marked for stable from last
series) and submit fix ASAP.
>
> --
> Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [REGRESSION] 4.9-rc4+ doesn't boot on my test box
2016-11-09 2:14 ` Kashyap Desai
@ 2016-11-09 2:28 ` Martin K. Petersen
0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2016-11-09 2:28 UTC (permalink / raw)
To: Kashyap Desai; +Cc: Jens Axboe, Martin K. Petersen, linux-scsi
>>>>> "Kashyap" == Kashyap Desai <kashyap.desai@broadcom.com> writes:
Kashyap,
>> Send a fix on top of current -git asap. The current tree is
>> completely broken for any megaraid user. -rc4 is no time to send in
>> untested patches, especially not something that claims to fix a 9
>> year old bug and is marked for stable as well.
*sigh* It's always the most innocuous patches that cause the worst
regressions :(
Kashyap> I will run some more test (using patch set only marked for
Kashyap> stable from last series) and submit fix ASAP.
I just tried a system with a megaraid card and things are broken in both
4.9/scsi-fixes and 4.10/scsi-queue unless the controller firmware has
the new sync flag set.
So, yes. Let's get a fix for this queued up ASAP.
Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-11-09 2:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08 17:42 [REGRESSION] 4.9-rc4+ doesn't boot on my test box Jens Axboe
2016-11-08 23:15 ` Martin K. Petersen
2016-11-09 0:20 ` Kashyap Desai
2016-11-09 1:19 ` Jens Axboe
2016-11-09 2:14 ` Kashyap Desai
2016-11-09 2:28 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.