Re: [PATCH v2] I/O errors for ALUA state transitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux