08 Sep, 2010

1 commit


25 May, 2010

1 commit


04 Dec, 2009

1 commit


04 Jun, 2009

1 commit

  • It would be nice to know how often we get checksum failures. Even
    better, how many of them we can fix with the single bit ecc. So, we add
    a statistics structure. The structure can be installed into debugfs
    wherever the user wants.

    For ocfs2, we'll put it in the superblock-specific debugfs directory and
    pass it down from our higher-level functions. The stats are only
    registered with debugfs when the filesystem supports metadata ecc.

    Signed-off-by: Joel Becker

    Joel Becker
     

06 Jan, 2009

5 commits

  • The previous optimization used a fast find-highest-bit-set operation to
    give us a good starting point in calc_code_bit(). This version lets the
    caller cache the previous code buffer bit offset. Thus, the next call
    always starts where the last one left off.

    This reduces the calculation another 39%, for a total 80% reduction from
    the original, naive implementation. At least, on my machine. This also
    brings the parity calculation to within an order of magnitude of the
    crc32 calculation.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • In the calc_code_bit() function, we must find all powers of two beneath
    the code bit number, *after* it's shifted by those powers of two. This
    requires a loop to see where it ends up.

    We can optimize it by starting at its most significant bit. This shaves
    32% off the time, for a total of 67.6% shaved off of the original, naive
    implementation.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • When I wrote ocfs2_hamming_encode(), I was following documentation of
    the algorithm and didn't have quite the (possibly still imperfect) grasp
    of it I do now. As part of this, I literally hand-coded xor. I would
    test a bit, and then add that bit via xor to the parity word.

    I can, of course, just do a single xor of the parity word and the source
    word (the code buffer bit offset). This cuts CPU usage by 53% on a
    mostly populated buffer (an inode containing utmp.h inline).

    Joel

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • Add block check calls to the read_block validate functions. This is the
    almost all of the read-side checking of metaecc. xattr buckets are not checked
    yet. Writes are also unchecked, and so a read-write mount will quickly fail.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • This is the code that computes crc32 and ecc for ocfs2 metadata blocks.
    There are high-level functions that check whether the filesystem has the
    ecc feature, mid-level functions that work on a single block or array of
    buffer_heads, and the low-level ecc hamming code that can handle
    multiple buffers like crc32_le().

    It's not hooked up to the filesystem yet.

    Signed-off-by: Joel Becker
    Cc: Christoph Hellwig
    Signed-off-by: Mark Fasheh

    Joel Becker