[Ocfs2-devel] [PATCH 06/14] ocfs2: Set the xattr name+value pair in one place

Joel Becker Joel.Becker at oracle.com
Tue Sep 1 01:30:47 PDT 2009


On Tue, Sep 01, 2009 at 03:33:07PM +0800, Tao Ma wrote:
> Joel Becker wrote:
> >+	rc = ocfs2_xa_has_space(loc, xi);
> >+	if (rc)
> >+		goto out;
> could you please add some comments here or change the function name.
> when I read ocfs2_xa_has_space, I always think that "if we have
> space, goto out". But actually we get 0 here if we have space.

	A very good point.  It really should be ocfs2_xa_space_needed().
Does that work?

> >+	if (loc->xl_entry) {
> >+		if (ocfs2_xa_can_reuse_entry(loc, xi)) {
> >+			nameval_buf = ocfs2_xa_offset_pointer(loc,
> >+				le16_to_cpu(loc->xl_entry->xe_name_offset));
> oh, I see you use ocfs2_xa_offset_pointer and offset =
> xe_name_offset here. So in patch 01/14, that is really a bug in
> ocfs2_xa_block_offset_pointer.

	Yeah, total bug.

Joel

-- 

"In a crisis, don't hide behind anything or anybody. They're going
 to find you anyway."
	- Paul "Bear" Bryant

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



More information about the Ocfs2-devel mailing list