Messages in this thread Patches in this message | | | Date | Thu, 31 Jan 2002 19:44:01 +0300 | From | Oleg Drokin <> | Subject | Re: Current Reiserfs Update / 2.5.2-dj7 Oops |
| |
Hello!
On Thu, Jan 31, 2002 at 02:11:01PM +0100, Dave Jones wrote:
Ok, I think we got it. And yes it it was reiserfs fault. What I really cannot understand is how it was working before???
Ok, so anybody who sees the oopses should try 2 patches attached. prealloc_init_list_head.diff is just forgotten initialisation and pick_correct_key_version.diff is the real fix.
I wonder is anybody will be able to reproduce a bug with these 2 fixes (I hope not).
Chris: Can you also take a look?
Bye, Oleg --- linux-2.5.3/fs/reiserfs/inode.c.orig Thu Jan 31 19:28:57 2002 +++ linux-2.5.3/fs/reiserfs/inode.c Thu Jan 31 19:31:01 2002 @@ -888,6 +888,8 @@ copy_key (INODE_PKEY (inode), &(ih->ih_key)); inode->i_blksize = PAGE_SIZE; + INIT_LIST_HEAD(&(REISERFS_I(inode)->i_prealloc_list )); + if (stat_data_v1 (ih)) { struct stat_data_v1 * sd = (struct stat_data_v1 *)B_I_PITEM (bh, ih); unsigned long blocks; @@ -1532,6 +1534,7 @@ REISERFS_I(inode)->i_first_direct_byte = S_ISLNK(mode) ? 1 : U32_MAX/*NO_BYTES_IN_DIRECT_ITEM*/; + INIT_LIST_HEAD(&(REISERFS_I(inode)->i_prealloc_list )); REISERFS_I(inode)->i_flags = 0; REISERFS_I(inode)->i_prealloc_block = 0; REISERFS_I(inode)->i_prealloc_count = 0;--- linux-2.5.3/fs/reiserfs/stree.c.orig Thu Jan 31 19:24:47 2002 +++ linux-2.5.3/fs/reiserfs/stree.c Thu Jan 31 19:26:54 2002 @@ -126,19 +126,19 @@ retval = comp_short_keys (le_key, cpu_key); if (retval) return retval; - if (le_key_k_offset (cpu_key->version, le_key) < cpu_key_k_offset (cpu_key)) + if (le_key_k_offset (le_key_version(le_key), le_key) < cpu_key_k_offset (cpu_key)) return -1; - if (le_key_k_offset (cpu_key->version, le_key) > cpu_key_k_offset (cpu_key)) + if (le_key_k_offset (le_key_version(le_key), le_key) > cpu_key_k_offset (cpu_key)) return 1; if (cpu_key->key_length == 3) return 0; /* this part is needed only when tail conversion is in progress */ - if (le_key_k_type (cpu_key->version, le_key) < cpu_key_k_type (cpu_key)) + if (le_key_k_type (le_key_version(le_key), le_key) < cpu_key_k_type (cpu_key)) return -1; - if (le_key_k_type (cpu_key->version, le_key) > cpu_key_k_type (cpu_key)) + if (le_key_k_type (le_key_version(le_key), le_key) > cpu_key_k_type (cpu_key)) return 1; return 0; | |