From: Brian King <brking@us.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [patch 03/15] libata: Remove dependence on host_set->dev for SAS
Date: Thu, 09 Feb 2006 16:21:22 -0600 [thread overview]
Message-ID: <43EBC062.3040304@us.ibm.com> (raw)
In-Reply-To: <43EAECD3.30505@pobox.com>
Jeff Garzik wrote:
> brking@us.ibm.com wrote:
>> Remove some of the dependence on the host_set struct
>> in preparation for supporting SAS HBAs. Adds a struct device
>> pointer to the ata_port struct.
>>
>> Signed-off-by: Brian King <brking@us.ibm.com>
>
> Seems like a good idea independent of SAS. My only "objection" is
> wondering about struct device reference counts, and wondering if we need
> to worry about that. Did you look over the object lifetimes, to make
> sure nothing overlaps?
I don't see any object lifetime problems being introduced as a result of
this patchset. I did spend some time looking through object lifetimes for
SAS users (existing users should be unaffected by these changes)
and I did have some problems in this regard in previous iterations
of this patchset. (I did some SATA device hotplug testing with this
patchset)
The two rules that need to be followed by any new users of this patchset
in order to not run into object lifetime problems are:
1. Prior to calling ata_sas_port_destroy, caller must guarantee that
there are no outstanding references to the scsi_device. I accomplished
this by calling ata_sas_port_destroy in target_destroy.
2. Before the pci_dev struct goes away (e.g. pci hotplug remove), all
oustanding commands must be returned to libata and any new requests
that come in through qc_issue should fail. This solves any lifetime
issues that could have resulted from having the dev pointer for the
PCI device in ata_port.
I was thinking at one point that I would need to add reference counting
to the ata_port, but was able to avoid that complexity with the solution
above.
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
prev parent reply other threads:[~2006-02-09 22:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-06 15:42 [patch 03/15] libata: Remove dependence on host_set->dev for SAS brking
2006-02-09 7:18 ` Jeff Garzik
2006-02-09 22:21 ` Brian King [this message]
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=43EBC062.3040304@us.ibm.com \
--to=brking@us.ibm.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).