On Tue, 22 Mar 2011 11:12:37 +0800
Miao Xie <mi...@cn.fujitsu.com> wrote:

> We can't fix it by this way, because the work threads may do insertion or 
> deletion at the same time,
> and we may lose some directory items.

Ok.
 
> Maybe we can fix it by adding a reference for the delayed directory items, we 
> can do read dir just
> like this:
> 1. hold the node lock
> 2. increase the directory items' reference and put all the directory items 
> into a list
> 3. release the node lock
> 4. read dir
> 5. decrease the directory items' reference and free them if the reference is 
> zero.
> What do you think about?

Sounds doable to me.

itaru
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to