lkml.org 
[lkml]   [2003]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH] fix for htree corruption. Was: [2.6] Perl weirdness with ext3 and HTREE
    On Tue, Aug 19, 2003 at 03:55:06AM -0700, Andrew Morton wrote:
    > chrisl@vmware.com wrote:
    >
    > Could you please regenerate a full, single diff against a known kernel
    > version? That patch generated 100% rejects for me...
    >
    >
    Sorry for that. Here is the patch again. It is against the 2.6-test3.
    It also apply cleanly on current BK tree.

    Chris


    ===== fs/ext3/namei.c 1.44 vs edited =====
    --- 1.44/fs/ext3/namei.c Sun Jun 29 23:49:04 2003
    +++ edited/fs/ext3/namei.c Tue Aug 19 03:28:52 2003
    @@ -1304,7 +1304,8 @@
    data1 = bh2->b_data;

    /* The 0th block becomes the root, move the dirents out */
    - de = (struct ext3_dir_entry_2 *) &root->info;
    + de = &root->dotdot;
    + de = (struct ext3_dir_entry_2 *) ((char *)de + de->rec_len);
    len = ((char *) root) + blocksize - (char *) de;
    memcpy (data1, de, len);
    de = (struct ext3_dir_entry_2 *) data1;
    @@ -2006,9 +2007,9 @@
    * recovery. */
    inode->i_size = 0;
    ext3_orphan_add(handle, inode);
    + inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
    ext3_mark_inode_dirty(handle, inode);
    dir->i_nlink--;
    - inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
    ext3_update_dx_flag(dir);
    ext3_mark_inode_dirty(handle, dir);

    @@ -2060,8 +2061,8 @@
    inode->i_nlink--;
    if (!inode->i_nlink)
    ext3_orphan_add(handle, inode);
    - ext3_mark_inode_dirty(handle, inode);
    inode->i_ctime = dir->i_ctime;
    + ext3_mark_inode_dirty(handle, inode);
    retval = 0;

    end_unlink:
    @@ -2220,7 +2221,6 @@
    goto end_rename;
    } else {
    BUFFER_TRACE(new_bh, "get write access");
    - BUFFER_TRACE(new_bh, "get_write_access");
    ext3_journal_get_write_access(handle, new_bh);
    new_de->inode = le32_to_cpu(old_inode->i_ino);
    if (EXT3_HAS_INCOMPAT_FEATURE(new_dir->i_sb,

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:47    [W:0.029 / U:90.560 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site