All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Grodzovsky <andrey2805@gmail.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	Igor Rybak <igor@media-clone.com>,
	Ezra Kohavi <ezra@media-clone.com>,
	PDL-MPT-FUSIONLINUX <MPT-FusionLinux.pdl@broadcom.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Sathya Prakash <sathya.prakash@broadcom.com>,
	Chaitra P B <chaitra.basappa@broadcom.com>,
	Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] [SCSI] mpt3sas: Fix secure erase premature termination (v2)
Date: Sat, 5 Nov 2016 09:17:57 -0400	[thread overview]
Message-ID: <CAJphD_oSmjHKP=HrHvVd4VwwzSQyhgCagjgQfxsAt9YJ1mN7Rg@mail.gmail.com> (raw)
In-Reply-To: <38e3e634-6e08-58bd-bc11-8a0a470b78d9@suse.de>

On Fri, Nov 4, 2016 at 10:51 AM, Hannes Reinecke <hare@suse.de> wrote:
> On 11/04/2016 01:45 PM, Sreekanth Reddy wrote:
>>
>> Hi All,
>>
>> From last two days, I was working with my firmware team to get the
>> required info over this issue. Here is my firmware team response
>>
>> "For ATA PASSTHROUGH commands, the IOC SATL will not check for the
>> opcode and will direct it to the drive. So even though ATA PASSTHOUGH
>> has ATA erase to the drive, IOC SATL FW will not know that and as a
>> general logic for all ATA PASSTHOGH commands, IOC FW will pend the
>> upcoming IOs untill the previous ATA PASSTHORUGH completes. This is as
>> per the SAT specification for SAS controllers and we can't compare it
>> with the SATA controllers in the on board that have full fledge SATA
>> implementation".
>>
>> So this is an expected behavior from our HBA firmware. i.e. it will
>> pend the subsequent commands if any ATA PASSTHROUGH command is going
>> on. So their is no issue with the FW.
>>
> But is there a way to figure out if the firmware / SATL layer is busy
> processing requests?
>
> With 'real' ATA HBAs these issue doesn't occur, as the ATA erase command is
> a non-queued command, and hence the next command automatically has to wait
> for the erase command to complete.
> But this wait happens as the ATA HBA returns 'BUSY', and the linux I/O stack
> will then reset the timeout for all consecutive commands.
>
> With mpt3sas _all_ commands are queued, so if there is a long-running I/O
> command all other commands already in the queue will time out.
>
> Which is at least a very awkward behaviour.
>
> Checking with SAT-3 (section 6.2.4: Commands the SATL queues internally) the
> implemented behaviour is standards conformant, although the standard also
> allows for returning 'TASK SET FULL' or 'BUSY' in these cases.
> Doing so would nicely solve this issue.
>
>> Today I have tried the same test case on my local setup. i.e. I have
>> issued a secure erase command using hdparm utility and observed the
>> same issue on 4.2.3-300.fc23.x86_64 kernel.
>>
>> Then after browsing over this issue, I found that some people are
>> recommending to enable 'CONFIG_IDE_TASK_IOCTL' Kconfig flag. I had a
>> compiled 4.4.0 kernel, so I have enabled this CONFIG_IDE_TASK_IOCTL
>> and recompiled this 4.4.0 kernel and booted in to this kernel. Then I
>> tried same test case and I haven't observed this issue and secure
>> erase operation was completed successfully.
>>
>> So, can you please try once with CONFIG_IDE_TASK_IOCTL enabled.
>>
> Errm.
> CONFIG_IDE_TASK_IOCTL is for the old IDE subsystem, which isn't in use here.
> So this option does not make a difference when using mpt3sas, as this is a
> 'real' SCSI driver which never calls out into any of these subsystems.
>
> I would be _VERY_ much surprised if that would make a difference.
>
> The reason why this behaviour did go unnoticed with older kernels was that a
> command timeout would trigger SCSI EH to engage, and that in turn required
> all outstanding commands to complete.
> So by the time SCSI EH started the ERASE command was complete, and a retry
> of the timed-out commands would work.

Indeed, when retesting with CONFIG_IDE_TASK_IOCTL=y and. reverting the
fix the bug is back.

Thanks,
Andrey
>
>
> Cheers,
>
> Hannes
> --
> Dr. Hannes Reinecke                   zSeries & Storage
> hare@suse.de                          +49 911 74053 688
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

  parent reply	other threads:[~2016-11-05 13:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-30 12:43 [PATCH] [SCSI] mpt3sas: Fix secure erase premature termination Andrey Grodzovsky
2016-10-30 12:43 ` Andrey Grodzovsky
2016-10-30 18:43 ` Hannes Reinecke
2016-10-30 18:43   ` Hannes Reinecke
2016-11-02  0:09   ` [PATCH] [SCSI] mpt3sas: Fix secure erase premature termination (v2) Andrey Grodzovsky
2016-11-02  0:09     ` Andrey Grodzovsky
2016-11-02  2:07     ` Hannes Reinecke
2016-11-02  2:07       ` Hannes Reinecke
2016-11-02 10:05       ` Sreekanth Reddy
     [not found]         ` <CAJphD_qrQftfCOn_uzXCfdX=Xv9BYvVQ60AZ4DR2rc3gfXQa_Q@mail.gmail.com>
     [not found]           ` <30w645ulbhlofxrk1h4a9q3s.1478144944778@email.android.com>
2016-11-04 12:45             ` Sreekanth Reddy
2016-11-04 14:51               ` Hannes Reinecke
2016-11-04 16:35                 ` Martin K. Petersen
2016-11-04 16:35                   ` Martin K. Petersen
2018-04-24  9:09                   ` Steffen Maier
2018-04-24 12:33                     ` Hannes Reinecke
2016-11-05 13:17                 ` Andrey Grodzovsky [this message]
2016-11-10 12:07                   ` Sreekanth Reddy
2016-11-10 13:42                     ` [PATCH] [SCSI] mpt3sas: Fix secure erase premature termination (v3) Andrey Grodzovsky
2016-11-10 13:42                       ` Andrey Grodzovsky
2016-11-10 13:54                       ` Greg KH
2016-11-10 14:35                         ` [PATCH] [SCSI] mpt3sas: Fix secure erase premature termination (v4) Andrey Grodzovsky
2016-11-10 14:35                           ` Andrey Grodzovsky
2016-11-11  4:38                           ` Sreekanth Reddy
2018-04-23 18:28                             ` Igor Rybak
2018-04-24  7:25                               ` Greg KH
2016-11-12 15:29                           ` Martin K. Petersen
2016-11-12 15:29                             ` Martin K. Petersen
2016-11-12 16:36                             ` Andrey Grodzovsky
2016-11-14 23:30                               ` Martin K. Petersen
2016-11-17  1:15                                 ` [PATCH] [SCSI] mpt2sas: Fix secure erase premature termination Andrey Grodzovsky
2016-11-17  7:11                                   ` Greg KH

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='CAJphD_oSmjHKP=HrHvVd4VwwzSQyhgCagjgQfxsAt9YJ1mN7Rg@mail.gmail.com' \
    --to=andrey2805@gmail.com \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=chaitra.basappa@broadcom.com \
    --cc=ezra@media-clone.com \
    --cc=hare@suse.de \
    --cc=igor@media-clone.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=stable@vger.kernel.org \
    --cc=suganath-prabu.subramani@broadcom.com \
    /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 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.