[Ocfs2-tools-devel] [PATCH 2/2] Modify the check in io_cache_disconnect.

Joel Becker Joel.Becker at oracle.com
Tue Oct 23 08:56:09 PDT 2007


On Tue, Oct 23, 2007 at 02:34:14PM +0800, tao.ma wrote:
> Joel Becker wrote:
>> On Mon, Oct 22, 2007 at 09:51:07AM +0800, tao.ma wrote:
>>   
>>> I have seen this happen in practice when I try to use it to speed up the 
>>> extent block iteration. ;)
>>>     
>>
>> 	I'd like to reproduce it here.

	I have now.

> RB_ROOT contains a pointer to a struct rb_node. So it always points to the 
> root and it is not the root itself. The real root's parent would be NULL 
> and it does't point to RB_ROOT actually since RB_ROOT(which is an instance 
> of rb-root) isn't defined as a rb-node(struct rb_node *parent).

	Indeed it is.  I didn't realize that until I ran the test :-)
	Ok, we do want your change.  However, your patch needs to
initialize icb_blkno in io_init_cache() (in the loop right before the
list_add).

Joel

-- 

"There is shadow under this red rock.
 (Come in under the shadow of this red rock)
 And I will show you something different from either
 Your shadow at morning striding behind you
 Or your shadow at evening rising to meet you.
 I will show you fear in a handful of dust."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list