From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, Jay Fenlason <fenlason@redhat.com>
Subject: Re: [PATCH 2/4] firewire: cdev: use an idr rather than a linked list for resources
Date: Thu, 18 Dec 2008 23:43:48 +0100 [thread overview]
Message-ID: <494AD224.4000200@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.c14b3f03d12b2b29@s5r6.in-berlin.de>
Stefan Richter wrote on 2008-12-14:
> From: Jay Fenlason <fenlason@redhat.com>
>
> The current code uses a linked list and a counter for storing
> resources and the corresponding handle numbers. By changing to an idr
> we can be safe from counter wrap-around giving two resources the same
> handle.
>
> Furthermore, the deallocation ioctls now check whether the resource to
> be freed is of the intended type.
>
> Signed-off-by: Jay Fenlason <fenlason@redhat.com>
>
> Some rework by Stefan R:
> - The idr API documentation says we get an ID within 0...0x7fffffff.
> Hence we can rest assured that idr handles fit into cdev handles.
> - Fix some races. Add a client->in_shutdown flag for this purpose.
> - Add allocation retry to add_client_resource().
> - It is possible to use idr_for_each() in fw_device_op_release().
> - Small style changes.
>
> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Back to the drawing board. This patch breaks FCP for dvgrab, kino,
gscanbus.
dvgrab: only works with -guid ...
kino: shows live preview but can't list nor control camcorder
gscanbus: segfaults if I click on the camera icon to bring up the info
window with AV/C controls.
--
Stefan Richter
-=====-==--- ==-- =--=-
http://arcgraph.de/sr/
next prev parent reply other threads:[~2008-12-18 22:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20081124163728.GA5826@redhat.com>
2008-11-24 19:09 ` idr: IDs guaranteed to be less than 1<<31? (was Re: [PATCH] firewire: us an idr rather than a linked list for resources) Stefan Richter
[not found] ` <492AEED8.9030102@s5r6.in-berlin.de>
[not found] ` <492AEF9D.5010307@s5r6.in-berlin.de>
2008-12-14 18:17 ` [PATCH 0/4] firewire: cdev resources and events Stefan Richter
2008-12-14 18:19 ` [PATCH 1/4] firewire: cdev: fix race of fw_device_op_release with bus reset Stefan Richter
2008-12-14 18:20 ` [PATCH 2/4] firewire: cdev: use an idr rather than a linked list for resources Stefan Richter
2008-12-18 22:43 ` Stefan Richter [this message]
2008-12-18 23:05 ` Stefan Richter
2008-12-21 15:47 ` [PATCH 2/4 update] " Stefan Richter
2008-12-14 18:21 ` [PATCH 3/4] firewire: cdev: address handler input validation Stefan Richter
2008-12-14 18:21 ` [PATCH 4/4] firewire: core: remove outdated comment Stefan Richter
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=494AD224.4000200@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=fenlason@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/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