linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Andrey Melnikov <temnota.am@gmail.com>
Cc: Zhong Li <lizhongfs@gmail.com>, linux-scsi@vger.kernel.org
Subject: Re: [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT
Date: Fri, 27 Sep 2019 16:16:42 +0200	[thread overview]
Message-ID: <aa9016ff-af17-f18b-abf8-ffb73438c394@suse.de> (raw)
In-Reply-To: <yq1h84y1vxh.fsf@oracle.com>

On 9/27/19 1:26 AM, Martin K. Petersen wrote:
> 
> Andrey,
> 
>>>> This patch break exposing individual RAID disks from adaptec raid
>>>> controller. I need access to this disc's for S.M.A.R.T monitoring.
>>
>> adaptec report hidden luns with PQ=1, PDT=0 - now it skipped.
> 
>>>> Please find other way to workaround bugs in IBM/2145 controller.
> 
> Spent some time on this today and I'm in agreement with Zhong's
> interpretation of the SCSI spec.
> 
> What puzzles me is that aacraid already supports the no_uld_attach
> feature so I'm not sure why it also sets PQ=1 for physical devices?
> 
> We could either have a SCSI host flag to override the behavior or
> consider masking PQ in the driver. Unfortunately, I don't have any
> aacraid controllers I can test with in my test setup so I'd have to
> synthesize a setup with scsi_debug.
> 
Well, the aacraid _is_ a strange beast.
Depending on the hardware it might even run fully emulated, with no SCSI
commands being handled at all by the firmware.
(But who am I to complain, the mylex one was even worse ...)
Additionally it has two pecularities:
1) all underlying devices are exported to the OS; of course they have to
be properly masked etc to avoid udev to latch on those devices. I also
was under the impression that the 'no_uld_attach' should be sufficient
here, but then that only avoids the 'sd' driver to become attached to
it. The actual SCSI device is still visible, so one _might_ be tempted
to use the 'sg' device and export it to things like qemu. Which of
course should be avoided.
And my guess here is that setting the PQ flag here is precisely for this
kind of things.
2) all RAID devices have the 'removable' flag set. This was done to
support online resize of the RAID device, but then I'm not sure if it's
still required. I for once would be happy to see that go.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      Teamlead Storage & Networking
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer

  reply	other threads:[~2019-09-27 14:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 15:49 [RFC,v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT Andrey Melnikov
2019-09-12  4:56 ` Zhong Li
2019-09-12 12:37   ` Andrey Melnikov
2019-09-22 12:07     ` Li Zhong
2019-09-26 23:26     ` Martin K. Petersen
2019-09-27 14:16       ` Hannes Reinecke [this message]
2019-10-01  1:53         ` Martin K. Petersen

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=aa9016ff-af17-f18b-abf8-ffb73438c394@suse.de \
    --to=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lizhongfs@gmail.com \
    --cc=martin.petersen@oracle.com \
    --cc=temnota.am@gmail.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 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).