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-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux