xfs
[Top] [All Lists]

Re: [xfs-masters] [PATCH] fs: Add new pre-allocation ioctls to vfs for c

To: Boaz Harrosh <bharrosh@xxxxxxxxxxx>
Subject: Re: [xfs-masters] [PATCH] fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls
From: Jamie Lokier <jamie@xxxxxxxxxxxxx>
Date: Tue, 3 Feb 2009 11:21:05 +0000
Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxxx>, mfasheh@xxxxxxxx, joel.becker@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xfs-masters@xxxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, Ankit Jain <me@xxxxxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx
In-reply-to: <4987F2B8.9070700@xxxxxxxxxxx>
References: <20090130171423.f99c88d0.akpm@xxxxxxxxxxxxxxxxxxxx> <20090201164130.GA32276@xxxxxxxxxxxxx> <4985D48A.6090007@xxxxxxxxxxx> <200902020131.04203.arnd@xxxxxxxx> <4986AEE8.5040609@xxxxxxxxxxx> <Pine.LNX.4.64.0902020942230.11930@anakin> <4986BE07.6090000@xxxxxxxxxxx> <20090202205102.GG28129@xxxxxxxxxxxxx> <4987F2B8.9070700@xxxxxxxxxxx>
User-agent: Mutt/1.5.13 (2006-08-11)
Boaz Harrosh wrote:
> I would at least expect a big fat comment explaining what happened to the
> structure on what known ARCHs, and how it is expected to look in memory.
> And a BUILD_BUG_ON to make sure of that.

You may have a point.

Struct layout on some architectures changes between compiler default
ABIs in these implicit-padding cases.  Kernel binary compatibility
will be affected.  It is a good reason why we have explicit padding to
natural alignment normally.

>From http://wiki.debian.org/ArmEabiPort

    "With the new ABI, default structure packing changes, as do some
    default data sizes and alignment (which also have a knock-on effect on
    structure packing). In particular the minimum size and alignment of a
    structure was 4 bytes. Under the EABI there is no minimum and the
    alignment is determined by the types of the components it
    contains. This will break programs that know too much about the way
    structures are packed and can break code that writes binary files by
    dumping and reading structures."

    "One of the key differences between the traditional GNU/Linux ABI
    and the EABI is that 64-bit types (like long long) are aligned
    differently. In the traditional ABI, these types had 4-byte alignment;
    in the EABI they have 8-byte alignment. As a result, if you use the
    same structure definitions (in a header file) and include it in code
    used in both the kernel and in application code, you may find that the
    structure size and alignment differ."

-- Jamie

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