[Ocfs2-tools-devel] [PATCH 10/11] ocfs2-tools: add xattr support in tunefs.ocfs2
Joel Becker
Joel.Becker at oracle.com
Tue Mar 3 13:19:20 PST 2009
On Fri, Feb 27, 2009 at 03:55:03PM +0800, Tiger Yang wrote:
> +static errcode_t remove_xattr_ibody(ocfs2_filesys *fs,
> + struct ocfs2_dinode *di)
> +{
> + errcode_t ret;
> + struct ocfs2_xattr_header *xh = NULL;
> +
> + xh = (struct ocfs2_xattr_header *)
> + ((void *)di + fs->fs_blocksize -
> + di->i_xattr_inline_size);
> +
> + ocfs2_swap_xattrs_to_cpu(xh);
Eek! This should have been done by ocfs2_read_inode(). Up in
the earlier patch where you define the swap functions, modify
ocfs2_swap_inode_{to,from}_cpu() to notice the inline xattrs and swap
there.
Joel
--
"I'm so tired of being tired,
Sure as night will follow day.
Most things I worry about
Never happen anyway."
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