From: Martin Wilck <mwilck@suse.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
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, Rajashekhar M A <rajs@netapp.com>
Subject: Re: [PATCH v2] I/O errors for ALUA state transitions
Date: Tue, 07 May 2024 11:10:51 +0200 [thread overview]
Message-ID: <cd3e2be2ee204a614f69b76f7eefcc50b1e9c4b2.camel@suse.com> (raw)
In-Reply-To: <20240506055433.GA5220@lst.de>
On Mon, 2024-05-06 at 07:54 +0200, Christoph Hellwig wrote:
> > -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.
>
I liked being able to write "return alua_handle_state_transition(...)"
in the caller. But np, I'll change it.
Martin
next prev parent reply other threads:[~2024-05-07 9:10 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
2024-05-07 9:10 ` Martin Wilck [this message]
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=cd3e2be2ee204a614f69b76f7eefcc50b1e9c4b2.camel@suse.com \
--to=mwilck@suse.com \
--cc=bvanassche@acm.org \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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