On Mon, 2011-11-07 at 14:58 -0600, Bill Kendall wrote:
> The qlock abstraction manages an array of ordinal bitmaps, one bitmap
> for each thread. The bitmap indicates which locks a thread is holding
> and is used to verify that the locks are obtained in the correct order.
> There is no need to use an array to store the bitmaps, and in fact
> adding entries to the array is broken because qlock_thrdcnt is not
> protected by a lock. A simpler approach is to create a per-thread bitmap
> using thread local storage.
> With this change, there is no need for each new thread to register with
> the qlock abstraction, so qlock_thrdinit() goes away. Remove
> qlock_init() since it can be statically initialized, and that means
> there's no need for a flag (qlock_inited) indicating that the module has
> been initialized. Also there's no longer a need to track or limit the
> number of threads that the qlock abstraction can handle.
> Signed-off-by: Bill Kendall <wkendall@xxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Wow, nice cleanup.
Reviewed-by: Alex Elder <aelder@xxxxxxx>