01 May, 2005

5 commits

  • Since we only access reiserfs_key ->u.k_offset_v2 guts in four helper
    functions, we are free to sanitize those, as long as

    - layout of the structure is unchanged (it's on-disk object)

    - behaviour of these helpers is same as before.

    Patch kills the mess with endianness-dependent bitfields and replaces them
    with a single __le64. Helpers are switched to straightforward shift/and/or.

    Benefits:

    - exact same definitions for little- and big-endian architectures; no ifdefs
    in sight.

    - generate the same code on little-endian and improved on big-endian.

    - doesn't rely on lousy bitfields handling in gcc codegenerator.

    - happens to be standard C (unsigned long long is not a valid type for a
    bitfield; it's a gccism and not well-implemented one, at that).

    Signed-off-by: Al Viro
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • comp_short_keys() massaged into sane form, which kills the last place where
    pointer to in_core_key (or any object containing such) would be cast to or
    from something else. At that point we are free to change layout of
    in_core_key - nothing depends on it anymore.

    So we drop the mess with union in there and simply use (unconditional) __u64
    k_offset and __u8 k_type instead; places using in_core_key switched to those.
    That gives _far_ better code than current mess - on all platforms.

    Signed-off-by: Al Viro
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • fixes for a couple of bugs exposed by the above: le32_to_cpu() used on 16bit
    value and missing conversion in comparison of host- and little-endian values.

    Signed-off-by: Al Viro
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • little-endian objects annotated as such; again, obviously no changes of
    resulting code, we only replace __u16 with __le16, etc. in relevant places.

    Signed-off-by: Al Viro
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • struct reiserfs_key cloned; (currently) identical struct in_core_key added.
    Places that expect host-endian data in reiserfs_key switched to in_core_key.
    Basically, we get annotation of reiserfs_key users and keep the resulting tree
    obviously equivalent to original.

    Signed-off-by: Al Viro
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds