Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-02-01 Thread Tejun Heo
Hello, David. On Fri, Feb 01, 2013 at 12:44:43PM -0500, David Teigland wrote: > I already tried my own version of this, but used idr_for_each_entry a > second time. Unfortunately, the number it found and printed did not match > recover_list_count. > > warning: recover_list_count 566 > > It

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-02-01 Thread David Teigland
On Thu, Jan 31, 2013 at 04:18:41PM -0800, Tejun Heo wrote: > It looks a bit weird to me that ls->ls_recover_list_count is also > incremented by recover_list_add(). The two code paths don't seem to > be interlocke at least upon my very shallow glance. Is it that only > either the list or idr is

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-02-01 Thread David Teigland
On Thu, Jan 31, 2013 at 04:18:41PM -0800, Tejun Heo wrote: It looks a bit weird to me that ls-ls_recover_list_count is also incremented by recover_list_add(). The two code paths don't seem to be interlocke at least upon my very shallow glance. Is it that only either the list or idr is in

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-02-01 Thread Tejun Heo
Hello, David. On Fri, Feb 01, 2013 at 12:44:43PM -0500, David Teigland wrote: I already tried my own version of this, but used idr_for_each_entry a second time. Unfortunately, the number it found and printed did not match recover_list_count. warning: recover_list_count 566 It printed

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-31 Thread Tejun Heo
Hello, David. On Thu, Jan 31, 2013 at 03:53:20PM -0800, Tejun Heo wrote: > The function description is misleading. The function does search > inclusive range and needs explicit cursor increment to make progress. > Weird that it doesn't work. Looking into it. I'll write when I know > more. It

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-31 Thread Tejun Heo
Hello, David. Sorry about the delay. On Wed, Jan 30, 2013 at 04:24:18PM -0500, David Teigland wrote: > > Unfortunately, the list_for_each_entry doesn't seem to be clearing > > everything. I've seen "warning: recover_list_count 39" at the end of that > > function. > > I don't want to pretend to

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-31 Thread Tejun Heo
Hello, David. Sorry about the delay. On Wed, Jan 30, 2013 at 04:24:18PM -0500, David Teigland wrote: Unfortunately, the list_for_each_entry doesn't seem to be clearing everything. I've seen warning: recover_list_count 39 at the end of that function. I don't want to pretend to

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-31 Thread Tejun Heo
Hello, David. On Thu, Jan 31, 2013 at 03:53:20PM -0800, Tejun Heo wrote: The function description is misleading. The function does search inclusive range and needs explicit cursor increment to make progress. Weird that it doesn't work. Looking into it. I'll write when I know more. It

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-30 Thread David Teigland
On Tue, Jan 29, 2013 at 10:13:17AM -0500, David Teigland wrote: > On Mon, Jan 28, 2013 at 10:57:23AM -0500, David Teigland wrote: > > On Fri, Jan 25, 2013 at 05:31:08PM -0800, Tejun Heo wrote: > > > idr_destroy() can destroy idr by itself and idr_remove_all() is being > > > deprecated. > > > > >

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-30 Thread David Teigland
On Tue, Jan 29, 2013 at 10:13:17AM -0500, David Teigland wrote: On Mon, Jan 28, 2013 at 10:57:23AM -0500, David Teigland wrote: On Fri, Jan 25, 2013 at 05:31:08PM -0800, Tejun Heo wrote: idr_destroy() can destroy idr by itself and idr_remove_all() is being deprecated. The

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-29 Thread David Teigland
On Mon, Jan 28, 2013 at 10:57:23AM -0500, David Teigland wrote: > On Fri, Jan 25, 2013 at 05:31:08PM -0800, Tejun Heo wrote: > > idr_destroy() can destroy idr by itself and idr_remove_all() is being > > deprecated. > > > > The conversion isn't completely trivial for recover_idr_clear() as > >

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-29 Thread David Teigland
On Mon, Jan 28, 2013 at 10:57:23AM -0500, David Teigland wrote: On Fri, Jan 25, 2013 at 05:31:08PM -0800, Tejun Heo wrote: idr_destroy() can destroy idr by itself and idr_remove_all() is being deprecated. The conversion isn't completely trivial for recover_idr_clear() as it's the only

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-28 Thread David Teigland
On Fri, Jan 25, 2013 at 05:31:08PM -0800, Tejun Heo wrote: > idr_destroy() can destroy idr by itself and idr_remove_all() is being > deprecated. > > The conversion isn't completely trivial for recover_idr_clear() as > it's the only place in kernel which makes legitimate use of > idr_remove_all()

Re: [PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-28 Thread David Teigland
On Fri, Jan 25, 2013 at 05:31:08PM -0800, Tejun Heo wrote: idr_destroy() can destroy idr by itself and idr_remove_all() is being deprecated. The conversion isn't completely trivial for recover_idr_clear() as it's the only place in kernel which makes legitimate use of idr_remove_all() w/o

[PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-25 Thread Tejun Heo
idr_destroy() can destroy idr by itself and idr_remove_all() is being deprecated. The conversion isn't completely trivial for recover_idr_clear() as it's the only place in kernel which makes legitimate use of idr_remove_all() w/o idr_destroy(). Replace it with idr_remove() call inside

[PATCH 10/14] dlm: don't use idr_remove_all()

2013-01-25 Thread Tejun Heo
idr_destroy() can destroy idr by itself and idr_remove_all() is being deprecated. The conversion isn't completely trivial for recover_idr_clear() as it's the only place in kernel which makes legitimate use of idr_remove_all() w/o idr_destroy(). Replace it with idr_remove() call inside