xfs
[Top] [All Lists]

Re: correct patch was Re: TAKE - make xfs's in memory extents host byte

To: Andi Kleen <ak@xxxxxxx>
Subject: Re: correct patch was Re: TAKE - make xfs's in memory extents host byte ordered
From: Stephen Lord <lord@xxxxxxx>
Date: 11 Oct 2002 05:09:31 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20021011030912.A1359@xxxxxxxxxxxxx>
References: <200210101909.g9AJ9pd12773@xxxxxxxxxxxxxxxxxxxx> <20021010213259.A23019@xxxxxxxxxxxxx> <1034296295.1074.28.camel@xxxxxxxxxxxxxxxxxxxxxxx> <20021011030451.A27822@xxxxxxxxxxxxx> <20021011030912.A1359@xxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Thu, 2002-10-10 at 20:09, Andi Kleen wrote:
> 
> Last mail had the wrong patch. Here is the correct one that should 
> actually compile
> 
> 
> --- linux/include/linux/byteorder/swab.h-o    2001-07-26 22:45:47.000000000 
> +0200
> +++ linux/include/linux/byteorder/swab.h      2002-10-11 03:03:32.000000000 
> +0200
> @@ -167,11 +167,11 @@
>  }
>  static __inline__ __u64 __swab64p(__u64 *x)
>  {
> -     return __arch__swab64p(x);
> +     *x = __fswab64(*x);
>  }
>  static __inline__ void __swab64s(__u64 *addr)
>  {
> -     __arch__swab64s(addr);
> +     *addr = __fswab64(*addr);
>  }
>  #endif /* __BYTEORDER_HAS_U64__ */
>  

Are you sure that would help? We only call into __swab64() from XFS
and, provided builtin_constant_p is doing its stuff this
should turn into __fswab64 which will execute this code:

        __u32 h = x >> 32;
        __u32 l = x & ((1ULL<<32)-1);
        return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));

At least I hope so... 

Also that change to the pointer version looks wrong, you have
a function which is supposed to return a value and no longer
does.

Steve



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