From: Jaikumar Ganesh <jaikumar@google.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Update SDP storage records when a record is deleted.
Date: Mon, 26 Oct 2009 08:20:59 -0700 [thread overview]
Message-ID: <e8892a6a0910260820g43b4f688g2c33d7d1ae771d07@mail.gmail.com> (raw)
In-Reply-To: <2d5a2c100910231044u6a6c65e0ka8258a6f65d08f41@mail.gmail.com>
Hi Luiz:
On Fri, Oct 23, 2009 at 10:44 AM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi,
>
> On Fri, Oct 23, 2009 at 12:17 PM, Jaikumar Ganesh <jaikumar@google.com> wrote:
> >
> > My mail to linux bluetooth bounced yesterday. Sending it again.
> >
> > The req->profiles_removed gets updated from device->uuids.
> > However, in the case, where we are paired with the remote device and
> > we unpair and then repair, since we will free device->uuids on the
> > unpair, the req->profiles_removed won't get updated after the SDP
> > query on repair. And so we would need to update the storage from
> > device->uuids.
>
> Im not sure if I get you right, but if you are saying that when device
> object is gone profiles_removed is empty that is the a new device and
> we shouldn't have any profile at that point for consistence, so either
> we remove the sdp cache on device_remove_stored or we never remove
> records from the cache. Perhaps the record cache is really useless and
> we should only cache the uuids information and query the record on
> every connect attempt (we are going to connect anyway so the cost is
> about the same.)
When the device is removed, we remove the cache and remove the device->uuids
value. So when the device is created the next time, we cannot depend on
the profiles_removed value, we need to reconstruct from device->uuids.
device_remove_drivers call is based on the profiles_removed flag and hence that
call will never be made, when a new device is created.
My change removes the dependency of SDP records and the probe_drivers,
Thus, removal of SDP records doesn't depend on the profiles_removed flag
but rather uses device->uuids directly.
profiles_added and profiles_removed flags are useful in the case where the user
calls discover services on an already created device and there are
changes in the SDP
records.
>
> > Since req->profiles_removed would be empty, device_remove_drivers
> > won't get called. Also I believe it makes sense to have 2 functions,
> > even though there is slight overhead, since the deletion of SDP
> > records from storage, and removing device_probe_drivers are 2 distinct
> > operations.
>
> Maybe if you called it on device_remove_stored too, but if we are
> going to validate that information on every connection attempt I doubt
> this is useful in the end.
>
> --
> Luiz Augusto von Dentz
> Engenheiro de Computação
Thanks
Jaikumar
next prev parent reply other threads:[~2009-10-26 15:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 23:19 [PATCH] Update SDP storage records when a record is deleted Jaikumar Ganesh
2009-10-22 23:58 ` Johan Hedberg
2009-10-23 13:49 ` Luiz Augusto von Dentz
2009-10-23 15:17 ` Jaikumar Ganesh
2009-10-23 17:44 ` Luiz Augusto von Dentz
2009-10-26 15:20 ` Jaikumar Ganesh [this message]
2009-10-28 19:00 ` jaikumar Ganesh
2009-10-28 23:34 ` Johan Hedberg
2009-10-28 23:45 ` Jaikumar Ganesh
2009-10-28 23:54 ` Johan Hedberg
2009-10-29 0:02 ` Jaikumar Ganesh
2009-10-29 0:15 ` Johan Hedberg
2009-10-29 18:42 ` Jaikumar Ganesh
2009-10-29 20:30 ` Jaikumar Ganesh
2009-10-29 20:34 ` Luiz Augusto von Dentz
2009-10-29 21:04 ` Jaikumar Ganesh
2009-10-29 21:13 ` Johan Hedberg
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=e8892a6a0910260820g43b4f688g2c33d7d1ae771d07@mail.gmail.com \
--to=jaikumar@google.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.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