[Ocfs2-tools-commits] branch, metaecc, created. ocfs2-tools-1.4.0-229-gead6a42

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Jan 13 11:09:25 PST 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Tools to manage the ocfs2 filesystem.".

The branch, metaecc has been created
        at  ead6a4244a35eb668d8f49b853520bb03650f009 (commit)

- Log -----------------------------------------------------------------
commit ead6a4244a35eb668d8f49b853520bb03650f009
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 19:13:43 2008 -0800

    libocfs2:  Add META_ECC to the supported feature list
    
    Add META_ECC to the list of features supported by the ocfs2 toolset.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit 552bc804e06c0f7045e2de7f9a7c5449acf86a2c
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:59:48 2008 -0800

    tunefs.ocfs2: Enable and disable the metaecc feature.
    
    The metaecc feature requires a bit of work.
    
    To disable it is easy; just clear the feature bit.  All structures left
    behind are fully compatible with filesystems that don't know about
    metaecc.
    
    Enabling it is hard work.  We must run though every block in the
    filesystem and compute its checksum and error correction values.  But
    even that's not all.  Directory blocks need trailers to store the ECC
    values, and the directories might not have them yet.  More on the
    trailers below.
    
    The preparation step runs through every inode in the filesystem.  If the
    inode does not need directory trailers - that is, it is not a directory,
    is an inline directory, or already has trailers - we add all of its
    metadata blocks to an rbtree.  This caches the blocks for later
    re-write.  We don't want to have to re-read them in the writeout step.
    If the inode is a directory requiring trailers, we call
    tunefs_prepare_dir_trailer() to determine how much space it needs.  At
    the end of this step, we have a list of all directories requiring
    trailers, and we know whether we have enough space to do the work.
    
    Next, we install all the trailers.  When this completes, we have a valid
    filesystem with trailers.  For each directory, we add its blocks to the
    rbtree after we've added the trailers.
    
    Finally, we run through the rbtree and compute the ECC values for each
    block.  When this is finished, we can write the META_ECC feature bit to
    the superblock.
    
    We add two functions to handle the trailers.
    
    tunefs_prepare_dir_trailer() will walk a directory and check all of its
    dirblocks.  If the directory needs trailers, a tunefs_trailer_context is
    returned.  This contains all the information needed to add trailers to
    this directory.  The caller can use this structure to determine how much
    allocation is needed.  The caller passes this structure to
    tunefs_install_dir_trailer() to actually write out the trailers for this
    directory.
    
    We add a tunefs-in-progress flag for adding dirblock trailers.
    
    When tunefs.ocfs2 is adding directory block trailers, it cannot do it
    atomically.  For some directory blocks, dirents have to be moved out of
    the way to make room for the trailer.  These dirents are shifted to new
    directory blocks.  When tunefs writes out the changes, it does so in the
    following order:
    
    1) Write out the new blocks
    2) Update the directory's i_size to include the new blocks
    3) Write the old blocks with trailers in place.
    
    If tunefs crashes after (1), the new blocks are just unused allocation.
    We're safe.  If tunefs crashes after (3), we have the directory with
    trailers correctly installed.  However, if tunefs crashes after (2), the
    old dirents are in the old blocks, but the shifted copies are in the new
    blocks.  This leaves duplicate dirents.  fsck.ocfs2 can fix them, but we
    need to set OCFS2_TUNEFS_INPROG_DIR_TRAILER to make sure fsck is run.
    
    The alternative order, writing out the old blocks before the new ones,
    leaves missing dirents in the case of a crash.  That's not a good plan.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit a7e485d5b048f3510bcb00700e431455711ab596
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:54:54 2008 -0800

    mkfs.ocfs2: Support the metaecc feature.
    
    mkfs.ocfs2 can now create filesystems with the metaecc feature enabled.
    It will compute checksums and error correction codes during the mkfs
    process.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit 9c95740e08bab178d2c7bb5fab38706b4051d609
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:53:42 2008 -0800

    debugfs.ocfs2: Dump the ocfs2_block_check structure (metaecc)
    
    The metaecc feature uses the ocfs2_block_check structure.  debugfs.ocfs2
    can now dump that field wherever it finds it.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit a6d23b80520955f1013ccebc04beed524367f929
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:52:31 2008 -0800

    libocfs2: Add support for metadata checksums and error correction.
    
    Use the functions in blockcheck.[ch] to add checksums and error
    correction to libocfs2.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit 30b82ffa6000b0f1d5dae6e2170b9f000d33cbe4
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:48:22 2008 -0800

    libocfs2: Add blockcheck.[ch]
    
    blockcheck.c contains the crc32_le() function from the kernel and the
    ocfs2_hamming_encode/fix() functions for computing the error correction
    codes.  These will be used to implement metadata checksums and error
    correction in the tools ("metaecc").
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit 83111ec2af8dbb91e033fcfb3d18d55efedbe81c
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:42:07 2008 -0800

    mkfs.ocfs2: Write directory trailers when necessary.
    
    Add the code to put trailers on dirblocks when they are created in mkfs.
    This includes a little convenience routine, fill_fake_fs(), that allows
    us to use simple functions on a fake ocfs2_filesys created from State.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit 24f98897dcaaed14102b3ba082d135282fcfa0d5
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:39:49 2008 -0800

    debugfs.ocfs2: Dump directory blocks
    
    Create the 'dirblocks' command for debugfs.  This prints the entire
    dirblock structure of a directory, including the new trailer information
    if it exists.
    
    As a bonus, the 'logdump' command can now dump dirblocks it detects via
    the trailer.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit e229ab4bcbc3cc955aabbf6c53cefadaaebebebc
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:37:28 2008 -0800

    fsck.ocfs2: Add checking of directory trailers.
    
    If we have trailers, fsck needs to know about them.
    
    In pass2, we don't treat the trailer of a directory block as a regular
    dirent.  We fix the trailer's compatibility fields if they are broken.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit a5c0171585c3c8a931e68ae06e49bca057602616
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:35:31 2008 -0800

    libocfs2: Support directory block trailers.
    
    Teach the various parts of libocfs2 to read, skip, and write directory
    block trailers.  These trailers live as a fake dirent at the end of the
    block.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit ef1751e3d155e13d2383ea15fc0ad5bed6655844
Author: Joel Becker <joel.becker at oracle.com>
Date:   Wed Dec 17 15:58:32 2008 -0800

    libocfs2: Pass the dinode to ocfs2_read/write_dir_block().
    
    Future code will need to look at the dinode when reading and writing
    dirblocks, so let's pass it in.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit e73e41db17b902d7b7cc3f35c1becf5045169242
Author: Joel Becker <joel.becker at oracle.com>
Date:   Mon Dec 29 18:12:15 2008 -0800

    libocfs2: Bring in ocfs2_fs.h from the kernel.
    
    Bring in the latest ocfs2_fs.h.  This includes the quota, xattr, and
    directory block trailer structures, as well as the ocfs2_block_check
    definitions we need for metadata checksums.
    
    The only changes from the kernel are:
    
    - Remove XATTR, QUOTA, and META_ECC from the list of supported features.
    - Remove the quota system files from the system inode list.
    
    sizetest.c is updated to match a few structure changes.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit 33db5ed024c2d2504e56bd6627769e0e2953e081
Author: Joel Becker <joel.becker at oracle.com>
Date:   Fri Jan 2 18:53:52 2009 -0800

    tunefs.ocfs2: Fix a substring bug in op_set_label.
    
    If tunefs was trying to set the label of a filesystem to a substring of
    the current label, it would consider the label already set, because it
    wasn't checking the string terminator.
    
    For example, a filesystem has the label "server12".  tunefs is run with
    the label "server1" (that is, 'tunefs -L server1').  tunefs will compare
    the two strings, but only to the length of the new label.  Since the new
    label is the same as the start of the old label, tunefs says "label
    already set" and does nothing.  This is wrong.
    
    The fix is to compare one byte more than the length of the new label.
    This includes the string terminating NUL character.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit 087e2e730921f1762e587009fb355ca9ce67899b
Author: Joel Becker <joel.becker at oracle.com>
Date:   Fri Jan 2 18:46:48 2009 -0800

    tunefs.ocfs2: Print the cloned-volume help more accurately
    
    We allow an optional label argument to --cloned-volume.  Because it is
    optional, it must be passed like "--cloned-volume=new-label".  A space
    ("--cloned-volume new-label") is not valid.
    
    Update the help string to match
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit f1cfb0e7494cee81e8942cd002e2b5da91909fe4
Author: Joel Becker <joel.becker at oracle.com>
Date:   Fri Jan 9 15:21:59 2009 -0800

    debugfs.ocfs2: Swap blocks we're dumping from the journal.
    
    The 'logdump' command reads blocks from the journal and tries to guess
    what kind of block they are.  If it finds a known block type, it then
    dumps the block.
    
    However, there is a bug.  The dump_*() functions of degugfs.ocfs2 assume
    the block has already been brought to cpu-endian.  The other callers
    (regular debugfs commands) swap the blocks.  So we need to swap the
    blocks in dump_jbd_metadata() before we call the dump_*() functions.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

commit 3ebf0bd7a509456af2b27db8512fc6612c0ca7f6
Author: Joel Becker <joel.becker at oracle.com>
Date:   Fri Jan 9 14:32:41 2009 -0800

    debugfs.ocfs2: Use a proper enum when dumping blocks in the journal.
    
    In the 'logdump' command, we detect the type of a block before dumping
    it.  However, we pass around literal integer values - silly, no?  Let's
    put together a proper enum.  This makes expanding it easier, too.
    
    Signed-off-by: Joel Becker <joel.becker at oracle.com>

-----------------------------------------------------------------------


hooks/post-receive
-- 
Tools to manage the ocfs2 filesystem.



More information about the Ocfs2-tools-commits mailing list