[Ocfs2-devel] [PATCH 05/15] Add xattr header in ocfs2.v2

Tao Ma tao.ma at oracle.com
Wed Jul 9 21:50:09 PDT 2008



Mark Fasheh wrote:
> [ everything up until this patch looks great ]
> 
> On Fri, Jun 27, 2008 at 03:01:10PM +0800, Tao Ma wrote:
>> +struct ocfs2_xattr_entry {
>> +	__le32	xe_name_hash;
>> +	__le16	xe_name_offset;
>> +	__u8	xe_name_len;
>> +	__u8	xe_type : 7;
>> +	__u8	xe_local : 1;
> 
> Would you mind turning xe_type / xe_local into just one __u8 with the
> bottom-most bit reserved for the local bit and the upper 7 bits used as
> type? I'm not quite sure about whether bitfields are considered safe for use
> in disk structures. At the very least, it seems a bit controversial.
> 
> I would heartily support you creating two pairs of _set / _get macros in
> this file to aid in such a change.
Ok, I will modify it and I will also modify the design doc for it.
Thanks.

Regards,
Tao




More information about the Ocfs2-devel mailing list