lkml.org 
[lkml]   [2008]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Squashfs-devel] Squashfs mainlining status?
	Hi Peter,

On Wed, 4 Jun 2008, Peter Korsgaard wrote:
> >>>>> "Phillip" == Phillip Lougher <phillip@lougher.demon.co.uk> writes:
> Phillip> The major work of course is the move to a little endian
> Phillip> layout without any bit fields in the structures to make it
> Phillip> easier to swap member fields on big-endian architectures.
> Phillip> I'm currently working on this on a non-CVS branch.
> Phillip> Most of the work till now has been without any attempt to
> Phillip> retain backwards compatibility with the current 3.3
> Phillip> little-endian filesystem layout. After your private email
> Phillip> regarding retaining backwards compatibility I will look
> Phillip> again at this issue, it may well be that I will abandon my
> Phillip> current layout changes that I have so far made.
>
> What private mail? Anything of interest to the rest of the group? As I

Oops, I've just returned from holidays, and realize I never actually responded
to this question. So here is the gist of it:

| I had a closer look at the structures and bitfields, and I still think it's
| possible to stay compatible with the current little endian layout:
| 1. About half of the bitfields are actually bytes or 16-bit words. Hence
| these can easily be converted to __u8 or __le16.
| 2. Most of the remaining bitfields sit in an 8, 16, or 32 bit integer.
| Hence these can be converted to such an integer (or an array of bytes,
| cfr. 3 below), and accessed using get_unaligned_le{16,32}() and a
| shift/mask operation.
| 3. There are a few bitfields that sit in an `odd' number of bytes. These
| can be converted to an array of bytes, and accessed using
| get_unaligned_le{16,32}() and a shift/mask operation.
| 4. The integral fields in the structs should be accessed using
| get_unaligned_le{8,16,32}(), too.

I noticed the squashfs CVS repository is getting a new (incompatible) 4.0
layout now?

What do people think?

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@eu.sony.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis 293-0376800-10 GEBA-BE-BB
\
 
 \ /
  Last update: 2008-07-17 17:37    [W:0.100 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site