The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v1 0/6] idr: add idr_alloc_cyclic and convert existing cyclic users
@ 2013-03-27 13:18 Jeff Layton
  2013-03-27 13:18 ` [PATCH v1 1/6] idr: introduce idr_alloc_cyclic Jeff Layton
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Jeff Layton @ 2013-03-27 13:18 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, tj

(Andrew, I think this is probably best routed via -mm since it touches
several different places)

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 |  5 ++--
 drivers/infiniband/hw/mlx4/cm.c        |  6 ++---
 fs/nfsd/nfs4state.c                    |  9 ++-----
 fs/notify/inotify/inotify_user.c       | 10 +++-----
 include/linux/fsnotify_backend.h       |  1 -
 include/linux/idr.h                    | 10 +++++++-
 lib/idr.c                              | 47 +++++++++++++++++++++++++++++++---
 net/sctp/associola.c                   | 15 +----------
 net/sctp/protocol.c                    |  2 +-
 10 files changed, 63 insertions(+), 43 deletions(-)

-- 
1.7.11.7


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-04-03 19:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27 13:18 [PATCH v1 0/6] idr: add idr_alloc_cyclic and convert existing cyclic users Jeff Layton
2013-03-27 13:18 ` [PATCH v1 1/6] idr: introduce idr_alloc_cyclic Jeff Layton
2013-03-27 16:25   ` Tejun Heo
2013-03-27 16:48     ` Jeff Layton
2013-03-27 17:01       ` Tejun Heo
2013-03-27 17:21         ` Jeff Layton
2013-03-27 13:18 ` [PATCH v1 2/6] amso1100: convert to using idr_alloc_cyclic Jeff Layton
2013-03-27 16:27   ` Tejun Heo
2013-03-27 16:50     ` Jeff Layton
2013-03-27 13:18 ` [PATCH v1 3/6] mlx4: " Jeff Layton
2013-03-27 13:18 ` [PATCH v1 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 13:18 ` [PATCH v1 5/6] inotify: convert inotify_add_to_idr " Jeff Layton
2013-03-27 13:18 ` [PATCH v1 6/6] sctp: convert sctp_assoc_set_id " Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox