lkml.org 
[lkml]   [2008]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] block: fix block_class iteration locking
On Mon, 14 Jul 2008 20:50:57 +0900,
Tejun Heo <tj@kernel.org> wrote:

> > With your patch, you protect against adding/removing devices to/from
> > the class between _start and _stop. This wasn't done previously, and
> > won't be done with Greg's patches (which leaves in the
> > locking/unlocking of block_class_lock). Not sure if I'm missing
> > something here...
>
> That's mostly the point of this patch. It wasn't protected properly
> before. It would be best if there's a safe iterator (maybe use klist?).

Hm, I don't see how a klist would help here since it still allows to
add/remove devices during walking the file.

What we need is more like a "lock/unlock the device list" operation and
a lockless iterator - that would give the same semantics as your patch.


\
 
 \ /
  Last update: 2008-07-21 19:57    [W:0.058 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site