* Patch "scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices" has been added to the 4.8-stable tree
@ 2016-11-09 8:18 gregkh
[not found] ` <a48ab14b1e168f2bee2fcc75f3f440ff@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: gregkh @ 2016-11-09 8:18 UTC (permalink / raw)
To: kashyap.desai, emilne, gregkh, hare, martin.petersen,
sumit.saxena, thenzl
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
scsi-megaraid_sas-fix-data-integrity-failure-for-jbod-passthrough-devices.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 1e793f6fc0db920400574211c48f9157a37e3945 Mon Sep 17 00:00:00 2001
From: Kashyap Desai <kashyap.desai@broadcom.com>
Date: Fri, 21 Oct 2016 06:33:32 -0700
Subject: scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
From: Kashyap Desai <kashyap.desai@broadcom.com>
commit 1e793f6fc0db920400574211c48f9157a37e3945 upstream.
Commit 02b01e010afe ("megaraid_sas: return sync cache call with
success") modified the driver to successfully complete SYNCHRONIZE_CACHE
commands without passing them to the controller. Disk drive caches are
only explicitly managed by controller firmware when operating in RAID
mode. So this commit effectively disabled writeback cache flushing for
any drives used in JBOD mode, leading to data integrity failures.
[mkp: clarified patch description]
Fixes: 02b01e010afeeb49328d35650d70721d2ca3fd59
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1713,16 +1713,13 @@ megasas_queue_command(struct Scsi_Host *
goto out_done;
}
- switch (scmd->cmnd[0]) {
- case SYNCHRONIZE_CACHE:
- /*
- * FW takes care of flush cache on its own
- * No need to send it down
- */
+ /*
+ * FW takes care of flush cache on its own for Virtual Disk.
+ * No need to send it down for VD. For JBOD send SYNCHRONIZE_CACHE to FW.
+ */
+ if ((scmd->cmnd[0] == SYNCHRONIZE_CACHE) && MEGASAS_IS_LOGICAL(scmd)) {
scmd->result = DID_OK << 16;
goto out_done;
- default:
- break;
}
return instance->instancet->build_and_issue_cmd(instance, scmd);
Patches currently in stable-queue which might be from kashyap.desai@broadcom.com are
queue-4.8/scsi-megaraid_sas-fix-data-integrity-failure-for-jbod-passthrough-devices.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch "scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices" has been added to the 4.8-stable tree
[not found] ` <a48ab14b1e168f2bee2fcc75f3f440ff@mail.gmail.com>
@ 2016-11-09 8:49 ` Greg KH
[not found] ` <8cf3887e20e37314f49066cea65369ee@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2016-11-09 8:49 UTC (permalink / raw)
To: Sumit Saxena
Cc: Kashyap Desai, emilne, hare, martin.petersen, thenzl, stable,
stable-commits
On Wed, Nov 09, 2016 at 02:15:10PM +0530, Sumit Saxena wrote:
> >-----Original Message-----
> >From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> >Sent: Wednesday, November 09, 2016 1:49 PM
> >To: kashyap.desai@broadcom.com; emilne@redhat.com;
> >gregkh@linuxfoundation.org; hare@suse.com; martin.petersen@oracle.com;
> >sumit.saxena@broadcom.com; thenzl@redhat.com
> >Cc: stable@vger.kernel.org; stable-commits@vger.kernel.org
> >Subject: Patch "scsi: megaraid_sas: Fix data integrity failure for JBOD
> >(passthrough) devices" has been added to the 4.8-stable tree
> >
> >
> >This is a note to let you know that I've just added the patch titled
> >
> > scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough)
> devices
> >
> >to the 4.8-stable tree which can be found at:
> > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-
> >queue.git;a=summary
> >
> >The filename of the patch is:
> > scsi-megaraid_sas-fix-data-integrity-failure-for-jbod-passthrough-
> >devices.patch
> >and it can be found in the queue-4.8 subdirectory.
> >
> >If you, or anyone else, feels it should not be added to the stable tree,
> please let
> ><stable@vger.kernel.org> know about it.
>
> There will be follow up patch which I will be sending in sometime so
> follow patch needs to be applied along with this patch.
Does that mean that this patch on its own is broken?
confused,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch "scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices" has been added to the 4.8-stable tree
[not found] ` <8cf3887e20e37314f49066cea65369ee@mail.gmail.com>
@ 2016-11-09 9:03 ` Greg KH
[not found] ` <fe425e4e97d881ac19f44f90cb3cd3d5@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2016-11-09 9:03 UTC (permalink / raw)
To: Sumit Saxena
Cc: Kashyap Desai, emilne, hare, martin.petersen, thenzl, stable,
stable-commits
On Wed, Nov 09, 2016 at 02:26:31PM +0530, Sumit Saxena wrote:
> >-----Original Message-----
> >From: Greg KH [mailto:gregkh@linuxfoundation.org]
> >Sent: Wednesday, November 09, 2016 2:19 PM
> >To: Sumit Saxena
> >Cc: Kashyap Desai; emilne@redhat.com; hare@suse.com;
> >martin.petersen@oracle.com; thenzl@redhat.com; stable@vger.kernel.org;
> >stable-commits@vger.kernel.org
> >Subject: Re: Patch "scsi: megaraid_sas: Fix data integrity failure for
> JBOD
> >(passthrough) devices" has been added to the 4.8-stable tree
> >
> >On Wed, Nov 09, 2016 at 02:15:10PM +0530, Sumit Saxena wrote:
> >> >-----Original Message-----
> >> >From: gregkh@linuxfoundation.org [mailto:gregkh@linuxfoundation.org]
> >> >Sent: Wednesday, November 09, 2016 1:49 PM
> >> >To: kashyap.desai@broadcom.com; emilne@redhat.com;
> >> >gregkh@linuxfoundation.org; hare@suse.com;
> >> >martin.petersen@oracle.com; sumit.saxena@broadcom.com;
> >> >thenzl@redhat.com
> >> >Cc: stable@vger.kernel.org; stable-commits@vger.kernel.org
> >> >Subject: Patch "scsi: megaraid_sas: Fix data integrity failure for
> >> >JBOD
> >> >(passthrough) devices" has been added to the 4.8-stable tree
> >> >
> >> >
> >> >This is a note to let you know that I've just added the patch titled
> >> >
> >> > scsi: megaraid_sas: Fix data integrity failure for JBOD
> >> > (passthrough)
> >> devices
> >> >
> >> >to the 4.8-stable tree which can be found at:
> >> > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-
> >> >queue.git;a=summary
> >> >
> >> >The filename of the patch is:
> >> >
> >> >scsi-megaraid_sas-fix-data-integrity-failure-for-jbod-passthrough-
> >> >devices.patch
> >> >and it can be found in the queue-4.8 subdirectory.
> >> >
> >> >If you, or anyone else, feels it should not be added to the stable
> >> >tree,
> >> please let
> >> ><stable@vger.kernel.org> know about it.
> >>
> >> There will be follow up patch which I will be sending in sometime so
> >> follow patch needs to be applied along with this patch.
> >
> >Does that mean that this patch on its own is broken?
> >
> >confused,
> Yes this patch is broken and follow up patch will fix that. I am doing
> some testing with fix and will send it in sometime.
So should I drop this one from the stable trees until that one is
merged?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Patch "scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices" has been added to the 4.8-stable tree
[not found] ` <fe425e4e97d881ac19f44f90cb3cd3d5@mail.gmail.com>
@ 2016-11-09 10:08 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2016-11-09 10:08 UTC (permalink / raw)
To: Kashyap Desai
Cc: Sumit Saxena, emilne, hare, martin.petersen, thenzl, stable,
stable-commits
On Wed, Nov 09, 2016 at 02:45:30PM +0530, Kashyap Desai wrote:
> > >> please let
> > > >> ><stable@vger.kernel.org> know about it.
> > > >>
> > > >> There will be follow up patch which I will be sending in sometime
> > > >> so follow patch needs to be applied along with this patch.
> > > >
> > > >Does that mean that this patch on its own is broken?
> > > >
> > > >confused,
> > > Yes this patch is broken and follow up patch will fix that. I am doing
> > > some testing with fix and will send it in sometime.
> >
> > So should I drop this one from the stable trees until that one is
> merged?
>
> Greg - We are sending another patch which is small fix on top of this one.
> It is critical regression.
> Not sure which will be a good .. To reject or hold current patch. Current
> patch is definitely a not good to keep without upcoming fix.
>
> To avoid confusion, let's reject this patch and apply once full fix is
> available (by EOD).
Ok, I've dropped this from the stable queue, please let me know when the
"fix" is in Linus's tree, so I can re-add this patch, and the fix patch
(please let me know what the git ids are for both.)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Patch "scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices" has been added to the 4.8-stable tree
@ 2016-11-14 7:41 gregkh
0 siblings, 0 replies; 5+ messages in thread
From: gregkh @ 2016-11-14 7:41 UTC (permalink / raw)
To: kashyap.desai, emilne, gregkh, hare, martin.petersen,
sumit.saxena, thenzl
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
scsi-megaraid_sas-fix-data-integrity-failure-for-jbod-passthrough-devices.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 1e793f6fc0db920400574211c48f9157a37e3945 Mon Sep 17 00:00:00 2001
From: Kashyap Desai <kashyap.desai@broadcom.com>
Date: Fri, 21 Oct 2016 06:33:32 -0700
Subject: scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
From: Kashyap Desai <kashyap.desai@broadcom.com>
commit 1e793f6fc0db920400574211c48f9157a37e3945 upstream.
Commit 02b01e010afe ("megaraid_sas: return sync cache call with
success") modified the driver to successfully complete SYNCHRONIZE_CACHE
commands without passing them to the controller. Disk drive caches are
only explicitly managed by controller firmware when operating in RAID
mode. So this commit effectively disabled writeback cache flushing for
any drives used in JBOD mode, leading to data integrity failures.
[mkp: clarified patch description]
Fixes: 02b01e010afeeb49328d35650d70721d2ca3fd59
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1713,16 +1713,13 @@ megasas_queue_command(struct Scsi_Host *
goto out_done;
}
- switch (scmd->cmnd[0]) {
- case SYNCHRONIZE_CACHE:
- /*
- * FW takes care of flush cache on its own
- * No need to send it down
- */
+ /*
+ * FW takes care of flush cache on its own for Virtual Disk.
+ * No need to send it down for VD. For JBOD send SYNCHRONIZE_CACHE to FW.
+ */
+ if ((scmd->cmnd[0] == SYNCHRONIZE_CACHE) && MEGASAS_IS_LOGICAL(scmd)) {
scmd->result = DID_OK << 16;
goto out_done;
- default:
- break;
}
return instance->instancet->build_and_issue_cmd(instance, scmd);
Patches currently in stable-queue which might be from kashyap.desai@broadcom.com are
queue-4.8/scsi-megaraid_sas-fix-macro-megasas_is_logical-to-avoid-regression.patch
queue-4.8/scsi-megaraid_sas-fix-data-integrity-failure-for-jbod-passthrough-devices.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-14 7:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-09 8:18 Patch "scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices" has been added to the 4.8-stable tree gregkh
[not found] ` <a48ab14b1e168f2bee2fcc75f3f440ff@mail.gmail.com>
2016-11-09 8:49 ` Greg KH
[not found] ` <8cf3887e20e37314f49066cea65369ee@mail.gmail.com>
2016-11-09 9:03 ` Greg KH
[not found] ` <fe425e4e97d881ac19f44f90cb3cd3d5@mail.gmail.com>
2016-11-09 10:08 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2016-11-14 7:41 gregkh
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).