[Ocfs2-tools-devel] [PATCH 2/3] ocfs2-tools: Add extended attribute support in libocfs2

Tao Ma tao.ma at oracle.com
Wed Sep 3 20:54:05 PDT 2008


Tiger Yang wrote:
>
>
> Tao Ma wrote:
>>>  int ocfs2_find_leaf(ocfs2_filesys *fs, struct ocfs2_dinode *di,
>>> +            struct ocfs2_extent_list *el,
>>>              uint32_t cpos, char **leaf_buf)
>> I think we don't need to pass "di" into this function any more.
> Without di, how can we get 'path' ?
> As I got path = ocfs2_new_path(fs, (char *)di, el);
If you look at ocfs2_new_path, you will see we only use di to get its 
i_blkno and set it to p_node[0].blkno.
So for a xattr, you can't do like this since the p_node[0].blkno isn't 
di->i_blkno anymore, it should be the root_el's blkno.
So maybe you should pass blkno to this function, not di.

Regards,
Tao



More information about the Ocfs2-tools-devel mailing list