Re: [PATCH 2/3] libsas: fix/amend device gone notification in sas_deform_port()

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

 



On Tue, May 3, 2011 at 11:36 AM, Dan Williams <dan.j.williams@xxxxxxxxx> wrote:
> This patch also introduces sas_device_gone() which hopefully allows
> subtle/tricky locking to be dropped from lldd drivers, like the
> following in mvsas which is broken if the ata path is ever converted to
> call lldd_execute_task() with irqs enabled:
[..]
> diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
> index 505ffe3..7a785df 100644
> --- a/drivers/scsi/libsas/sas_expander.c
> +++ b/drivers/scsi/libsas/sas_expander.c
> @@ -1721,13 +1721,27 @@ out:
>        return res;
>  }
>
> +/* FIXME: delete this routine when/if sas_ata stops submitting tasks
> + * with host_lock held
> + */
> +void sas_device_gone(struct domain_device *dev)
> +{
> +       struct sas_rphy *rphy = dev->rphy;
> +       struct Scsi_Host *shost = dev_to_shost(rphy->dev.parent);
> +
> +       /* take the lock to synchronize against incoming sata i/o */
> +       spin_lock_irq(shost->host_lock);
> +       dev->gone = 1;
> +       spin_unlock_irq(shost->host_lock);
> +}

Commit a29b5dad "libata: fix locking for sas paths" has gone in since
this patch was created so this locking no longer has any effect.

Now needs to be dev->sata_dev.ap->lock, will resubmit.

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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