All of lore.kernel.org
 help / color / mirror / Atom feed
From: chrisl@vmware.com
To: Andrew Morton <akpm@osdl.org>
Cc: azarah@gentoo.org, linux-kernel@vger.kernel.org,
	adilger@clusterfs.com, ext3-users@redhat.com,
	x86-kernel@gentoo.org, ext2-devel@lists.sourceforge.net
Subject: Re: [PATCH] fix for htree corruption. Was: [2.6] Perl weirdness with ext3 and HTREE
Date: Tue, 19 Aug 2003 11:23:20 -0700	[thread overview]
Message-ID: <20030819182320.GA1475@vmware.com> (raw)
In-Reply-To: <20030819035506.28f72a6a.akpm@osdl.org>

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,



  reply	other threads:[~2003-08-19 18:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-06 20:22 [2.6] Perl weirdness with ext3 and HTREE Christopher Li
2003-08-06 22:28 ` Martin Schlemmer
2003-08-19 10:40   ` [PATCH] fix for htree corruption. Was: " chrisl
2003-08-19 10:55     ` Andrew Morton
2003-08-19 18:23       ` chrisl [this message]
2003-08-19 14:17     ` Martin Schlemmer
2003-08-21 19:46     ` Martin Schlemmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030819182320.GA1475@vmware.com \
    --to=chrisl@vmware.com \
    --cc=adilger@clusterfs.com \
    --cc=akpm@osdl.org \
    --cc=azarah@gentoo.org \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=ext3-users@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86-kernel@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.