xfs
[Top] [All Lists]

Re: [PATCH 6/6] xfs: pad xfs_attr_leaf_name_remote to avoid tripping on

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 6/6] xfs: pad xfs_attr_leaf_name_remote to avoid tripping on m68k
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 7 Mar 2016 08:28:58 -0800
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1457300990-18300-7-git-send-email-david@xxxxxxxxxxxxx>
References: <1457300990-18300-1-git-send-email-david@xxxxxxxxxxxxx> <1457300990-18300-7-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.24 (2015-08-30)
On Mon, Mar 07, 2016 at 08:49:50AM +1100, Dave Chinner wrote:
> From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
> 
> Pad the xfs_attr_leaf_name_remote so that we don't trip the structure
> size checker on m68k.
> 
> [dchinner: add comment, XFS_ATTR_LEAF_NAME_BYTES constant and make sure
>          xfs_attr_leaf_entsize_remote() does the right thing. ]

I think using a small fixed size array as a variable sized array
is not a good idea, especially with increasinly "smart" optimizing
compilers.  I'd rather take this structure out the size checking,
and then move it to a C99 VLA instead of the size 1 hack in the long
run.

<Prev in Thread] Current Thread [Next in Thread>