From: John Garry <john.g.garry@oracle.com>
To: Benjamin Marzinski <bmarzins@redhat.com>
Cc: hch@lst.de, kbusch@kernel.org, martin.petersen@oracle.com,
james.bottomley@hansenpartnership.com, hare@suse.com,
jmeneghi@redhat.com, linux-nvme@lists.infradead.org,
sagi@grimberg.me, axboe@fb.com, linux-scsi@vger.kernel.org,
michael.christie@oracle.com, snitzer@kernel.org,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
nilay@linux.ibm.com
Subject: Re: [PATCH 5/8] scsi: scsi-multipath: Add basic ALUA support
Date: Mon, 16 Mar 2026 09:25:06 +0000 [thread overview]
Message-ID: <4bb3cff8-92aa-4635-a423-96c6f6294c77@oracle.com> (raw)
In-Reply-To: <abTokAgL5B8NS8ae@redhat.com>
On 14/03/2026 04:48, Benjamin Marzinski wrote:
>> + ext_hdr_unsupp = true;
>> + goto retry;
>> + }
>> + /*
>> + * If the array returns with 'ALUA state transition'
>> + * sense code here it cannot return RTPG data during
>> + * transition. So set the state to 'transitioning' directly.
>> + */
>> + if (sense_hdr.sense_key == NOT_READY &&
>> + sense_hdr.asc == 0x04 && sense_hdr.ascq == 0x0a)
>> + goto out;
> This check is odd. First, we don't set the state to 'transitioning' like
> the comment says. We don't set alua_state at all, which ends up meaning
> that it stays as 0 (SCSI_ACCESS_STATE_OPTIMAL). It seems like we should
> explicitly set it and make the comment reflect that, if just to aid
> understanding of the logic.
Yeah, I have to admit that this is all bodged the a bit, as
transitioning is not properly handled. Instead of "basic" ALUA support,
this really is limited ALUA support.
I am now looking at a way to have a core scsi ALUA driver to handle all
of this, but it is challenging as we need to continue ALUA DH support.
>
> Nitpick: Also, this is the only place where we goto out. All the other
> checks individually free the buffer and return directly. I realize that
> all the other checks that exit early are errors, but it seems like we
> could just return a variable at the end of the function.
Sure, I can pay attention to this. However, as mentioned above, I am
experimenting with moving any ALUA specifics into scsi core code.
>
>> +
>> + /*
>> + * Retry on any other UNIT ATTENTION occurred.
>> + */
>> + if (sense_hdr.sense_key == UNIT_ATTENTION) {
>> + scsi_print_sense_hdr(sdev, __func__, &sense_hdr);
>> + kfree(buff);
>> + return -EAGAIN;
>> + }
> If we get a UNIT ATTENTION, we end up failing scsi_mpath_dev_alloc(),
> not retrying. Aside from the comment being wrong, it seems very brittle
> to fail here, just because we got a UNIT ATTENTION.
Ack
Thanks,
John
next prev parent reply other threads:[~2026-03-16 9:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 11:49 [PATCH 0/8] scsi-multipath: Basic " John Garry
2026-03-10 11:49 ` [PATCH 1/8] libmultipath: add mpath_call_for_all_devices() John Garry
2026-03-10 11:49 ` [PATCH 2/8] scsi: scsi_dh_alua: Do not attach for SCSI native multipath John Garry
2026-03-10 11:49 ` [PATCH 3/8] scsi: scsi_dh_alua: Pass submit_rtpg() a bool for extended header support John Garry
2026-03-10 11:49 ` [PATCH 4/8] scsi: Create a core ALUA driver John Garry
2026-03-14 4:35 ` Benjamin Marzinski
2026-03-16 9:12 ` John Garry
2026-03-10 11:49 ` [PATCH 5/8] scsi: scsi-multipath: Add basic ALUA support John Garry
2026-03-10 13:23 ` Hannes Reinecke
2026-03-10 15:52 ` John Garry
2026-03-10 17:54 ` Hannes Reinecke
2026-03-10 18:13 ` John Garry
2026-03-14 4:48 ` Benjamin Marzinski
2026-03-16 9:25 ` John Garry [this message]
2026-03-10 11:49 ` [PATCH 6/8] scsi: scsi-multipath: Maintain sdev->access_state John Garry
2026-03-10 13:27 ` Hannes Reinecke
2026-03-10 15:54 ` John Garry
2026-03-10 11:49 ` [PATCH 7/8] scsi: scsi-multipath: Issue a periodic TUR per path John Garry
2026-03-10 13:34 ` Hannes Reinecke
2026-03-10 17:21 ` John Garry
2026-03-10 11:49 ` [PATCH 8/8] scsi: scsi-multipath: Add stubbed scsi_multipath_dev_rescan() John Garry
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=4bb3cff8-92aa-4635-a423-96c6f6294c77@oracle.com \
--to=john.g.garry@oracle.com \
--cc=axboe@fb.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=jmeneghi@redhat.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=nilay@linux.ibm.com \
--cc=sagi@grimberg.me \
--cc=snitzer@kernel.org \
/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
all inboxes | Powered by JetHome®