[Ocfs2-devel] [PATCH 06/14] ocfs2: Set the xattr name+value pair in one place
Tao Ma
tao.ma at oracle.com
Tue Sep 1 01:47:41 PDT 2009
Joel Becker wrote:
> 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?
actually your function just return either -ENOSPC, -EIO or 0.
And we go ahead when we get 0. so maybe ocfs2_xa_check_space? So <0
means we meet with some errors and 0 means OK.
Regards,
Tao
More information about the Ocfs2-devel
mailing list