xfs
[Top] [All Lists]

Re: [PATCH 5/14] xfsprogs: sync commit f5f3d9b016 completely

To: Ben Myers <bpm@xxxxxxx>
Subject: Re: [PATCH 5/14] xfsprogs: sync commit f5f3d9b016 completely
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 08 Aug 2013 17:05:11 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20130808212012.GS3111@xxxxxxx>
References: <1370564771-4929-1-git-send-email-david@xxxxxxxxxxxxx> <20130806214154.GM3111@xxxxxxx> <20130808210600.GN3111@xxxxxxx> <20130808212012.GS3111@xxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
On 8/8/13 4:20 PM, Ben Myers wrote:
> TODO
> 
> ---
>  include/xfs_dir2_format.h |    2 +-
>  libxfs/xfs_dir2_data.c    |    2 ++
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> Index: b/include/xfs_dir2_format.h
> ===================================================================
> --- a/include/xfs_dir2_format.h       2013-08-06 12:52:58.830818621 -0500
> +++ b/include/xfs_dir2_format.h       2013-08-06 12:53:38.550877679 -0500
> @@ -247,7 +247,7 @@ typedef struct xfs_dir2_data_free {
>   */
>  typedef struct xfs_dir2_data_hdr {
>       __be32                  magic;          /* XFS_DIR2_DATA_MAGIC or */
> -     /* XFS_DIR2_BLOCK_MAGIC */
> +                                             /* XFS_DIR2_BLOCK_MAGIC */
>       xfs_dir2_data_free_t    bestfree[XFS_DIR2_DATA_FD_COUNT];
>  } xfs_dir2_data_hdr_t;
>  
> Index: b/libxfs/xfs_dir2_data.c
> ===================================================================
> --- a/libxfs/xfs_dir2_data.c  2013-08-06 12:54:17.540817693 -0500
> +++ b/libxfs/xfs_dir2_data.c  2013-08-06 12:55:10.460877745 -0500
> @@ -54,6 +54,7 @@ __xfs_dir2_data_check(
>       p = (char *)xfs_dir3_data_entry_p(hdr);
>  
>       switch (be32_to_cpu(hdr->magic)) {
> +             /* XXX bpm endian switch does not match commit */

in userspace, for some reason, doing it the "kernel way"

(i.e. 

switch (hdr->magic) {
case cpu_to_be32(XFS_DIR2_BLOCK_MAGIC):

 ...)

yields:

xfs_dir2_data.c:57: error: case label does not reduce to an integer constant

-Eric

>       case XFS_DIR2_BLOCK_MAGIC:
>       case XFS_DIR3_BLOCK_MAGIC:
>               btp = xfs_dir2_block_tail_p(mp, hdr);
> @@ -203,6 +204,7 @@ xfs_dir2_data_reada_verify(
>       struct xfs_dir2_data_hdr *hdr = bp->b_addr;
>  
>       switch (be32_to_cpu(hdr->magic)) {
> +             /* XXX bpm: endian switch does not match kernel commit */
>       case XFS_DIR2_BLOCK_MAGIC:
>       case XFS_DIR3_BLOCK_MAGIC:
>               bp->b_ops = &xfs_dir3_block_buf_ops;
> 

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