From: Christoph Hellwig <hch@lst.de>
To: Martin Wilck <martin.wilck@suse.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
James Bottomley <jejb@linux.vnet.ibm.com>,
Ewan Milne <emilne@redhat.com>,
Bart Van Assche <bvanassche@acm.org>,
linux-scsi@vger.kernel.org, Martin Wilck <mwilck@suse.com>,
Rajashekhar M A <rajs@netapp.com>
Subject: Re: [PATCH v2] I/O errors for ALUA state transitions
Date: Mon, 6 May 2024 07:54:33 +0200 [thread overview]
Message-ID: <20240506055433.GA5220@lst.de> (raw)
In-Reply-To: <20240503195606.13120-1-mwilck@suse.com>
> -static enum scsi_disposition alua_check_sense(struct scsi_device *sdev,
> - struct scsi_sense_hdr *sense_hdr)
> +static enum scsi_disposition alua_handle_state_transition(struct scsi_device *sdev)
> {
> struct alua_dh_data *h = sdev->handler_data;
> struct alua_port_group *pg;
>
> + /*
> + * LUN Not Accessible - ALUA state transition
> + */
> + rcu_read_lock();
> + pg = rcu_dereference(h->pg);
> + if (pg)
> + pg->state = SCSI_ACCESS_STATE_TRANSITIONING;
> + rcu_read_unlock();
> + alua_check(sdev, false);
> + return NEEDS_RETRY;
This always returns NEEDS_RETRY, so you can drop the return value
entirely and handle this in the callers.
next prev parent reply other threads:[~2024-05-06 5:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-03 19:56 [PATCH v2] I/O errors for ALUA state transitions Martin Wilck
2024-05-06 5:54 ` Christoph Hellwig [this message]
2024-05-07 9:10 ` Martin Wilck
2024-05-06 21:48 ` Mike Christie
2024-05-07 9:09 ` Martin Wilck
2024-05-07 9:12 ` Damien Le Moal
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=20240506055433.GA5220@lst.de \
--to=hch@lst.de \
--cc=bvanassche@acm.org \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=martin.wilck@suse.com \
--cc=mwilck@suse.com \
--cc=rajs@netapp.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