From: Jeff Layton <jlayton@redhat.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, tj@kernel.org
Subject: [PATCH v2 0/6] idr: add idr_alloc_cyclic and convert existing cyclic users
Date: Wed, 27 Mar 2013 15:29:32 -0400 [thread overview]
Message-ID: <1364412578-7462-1-git-send-email-jlayton@redhat.com> (raw)
(Andrew, I think this is probably best routed via -mm since it touches
several different places)
This is the second version of this patchset. The main changes are:
- removed an incorrect comment on the new allocator function that
stemmed from a misunderstanding of the IDR code. Also fixed up
the kerneldoc comment.
- the idr_init_cyclic function has been removed, since it doesn't add
any benefit over a "normal" idr_init.
- minor change to the caller in inotify code to make it not allocate
an ID of 0. The existing code starts at 1, so this seems like a
reasonable precaution.
Original cover letter follows:
As Tejun points out, there are several users of the IDR facility that
attempt to use it in a cyclic fashion. These users are likely to see
-ENOSPC errors after the counter wraps one or more times however.
This patchset adds a new idr_alloc_cyclic routine and converts several
of these users to it. Many of these users are in obscure parts of the
kernel, and I don't have a good way to test some of them. The change is
pretty straightforward though, so hopefully it won't be an issue.
There is one other cyclic user of idr_alloc that I didn't touch in
ipc/util.c. That one is doing some strange stuff that I didn't quite
understand, but it looks like it should probably be converted later
somehow.
Jeff Layton (6):
idr: introduce idr_alloc_cyclic
amso1100: convert to using idr_alloc_cyclic
mlx4: convert to using idr_alloc_cyclic
nfsd: convert nfs4_alloc_stid to use idr_alloc_cyclic
inotify: convert inotify_add_to_idr to use idr_alloc_cyclic
sctp: convert sctp_assoc_set_id to use idr_alloc_cyclic
drivers/infiniband/hw/amso1100/c2.h | 1 -
drivers/infiniband/hw/amso1100/c2_qp.c | 3 +--
drivers/infiniband/hw/mlx4/cm.c | 4 +---
fs/nfsd/nfs4state.c | 7 +------
fs/notify/inotify/inotify_user.c | 8 ++------
include/linux/fsnotify_backend.h | 1 -
include/linux/idr.h | 2 ++
lib/idr.c | 27 +++++++++++++++++++++++++++
net/sctp/associola.c | 16 ++--------------
9 files changed, 36 insertions(+), 33 deletions(-)
--
1.7.11.7
next reply other threads:[~2013-03-27 19:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 19:29 Jeff Layton [this message]
2013-03-27 19:29 ` [PATCH v2 1/6] idr: introduce idr_alloc_cyclic Jeff Layton
2013-03-27 19:29 ` [PATCH v2 2/6] amso1100: convert to using idr_alloc_cyclic Jeff Layton
2013-03-27 19:35 ` Tejun Heo
2013-03-27 19:29 ` [PATCH v2 3/6] mlx4: " Jeff Layton
2013-03-27 19:29 ` [PATCH v2 4/6] nfsd: convert nfs4_alloc_stid to use idr_alloc_cyclic Jeff Layton
2013-04-03 19:24 ` J. Bruce Fields
2013-03-27 19:29 ` [PATCH v2 5/6] inotify: convert inotify_add_to_idr " Jeff Layton
2013-03-27 19:29 ` [PATCH v2 6/6] sctp: convert sctp_assoc_set_id " Jeff Layton
2013-03-28 13:53 ` Neil Horman
2013-03-28 14:04 ` Neil Horman
2013-03-31 10:23 ` Jeff Layton
2013-03-27 19:38 ` [PATCH v2 0/6] idr: add idr_alloc_cyclic and convert existing cyclic users Tejun Heo
2013-03-27 19:50 ` Andrew Morton
2013-03-27 19:58 ` Jeff Layton
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=1364412578-7462-1-git-send-email-jlayton@redhat.com \
--to=jlayton@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@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
all inboxes | Powered by JetHome®