Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 5 Apr 2002 14:30:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 5 Apr 2002 14:30:26 -0500 Received: from backtop.namesys.com ([212.16.7.71]:27265 "EHLO bitshadow.namesys.com") by vger.kernel.org with ESMTP id ; Fri, 5 Apr 2002 14:30:14 -0500 Date: Sat, 6 Apr 2002 00:27:38 +0400 Message-Id: <200204052027.g35KRc002869@bitshadow.namesys.com> From: Hans Reiser To: torvalds@transmeta.com, linux-kernel@vger.kernel.org Subject: ReiserFS Bug Fixes 3 of 6 (Please apply all 6) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This changeset is to fix several reiserfs problems which can be fixed in non-intrusive way. You can use bk receive to get it. Diffstat: Makefile | 2 +- bitmap.c | 6 ++---- dir.c | 1 + inode.c | 13 ++++++++----- super.c | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) patch and changelog: # This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.587 -> 1.588 # fs/reiserfs/dir.c 1.12 -> 1.13 # fs/reiserfs/inode.c 1.38 -> 1.41 # fs/reiserfs/super.c 1.33 -> 1.34 # fs/reiserfs/Makefile 1.5 -> 1.6 # fs/reiserfs/bitmap.c 1.15 -> 1.16 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/04/05 green@angband.namesys.com 1.588 # bitmap.c: # fixed "unused variable" warning. # super.c: # Fix a mispelling in info message. # Makefile: # tail_conversion.o was specified twice in list of objects to build # inode.c: # Add forgotten metadata journaling. # Fix a case where flag was not set at inode-read time which prevented # 32bit uid/gid to work correctly. # Fix a lookup problem on big-endian platforms. # dir.c: # Fix a case where atime were not updated when needed. # -------------------------------------------- # diff -Nru a/fs/reiserfs/Makefile b/fs/reiserfs/Makefile --- a/fs/reiserfs/Makefile Fri Apr 5 14:16:14 2002 +++ b/fs/reiserfs/Makefile Fri Apr 5 14:16:14 2002 @@ -9,7 +9,7 @@ O_TARGET := reiserfs.o obj-y := bitmap.o do_balan.o namei.o inode.o file.o dir.o fix_node.o super.o prints.o objectid.o \ -lbalance.o ibalance.o stree.o hashes.o buffer2.o tail_conversion.o journal.o resize.o tail_conversion.o item_ops.o ioctl.o procfs.o +lbalance.o ibalance.o stree.o hashes.o buffer2.o tail_conversion.o journal.o resize.o item_ops.o ioctl.o procfs.o obj-m := $(O_TARGET) diff -Nru a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c --- a/fs/reiserfs/bitmap.c Fri Apr 5 14:16:14 2002 +++ b/fs/reiserfs/bitmap.c Fri Apr 5 14:16:14 2002 @@ -139,10 +139,8 @@ /* preallocated blocks don't need to be run through journal_mark_freed */ void reiserfs_free_prealloc_block (struct reiserfs_transaction_handle *th, unsigned long block) { - struct super_block * s = th->t_super; - - RFALSE(!s, "vs-4060: trying to free block on nonexistent device"); - RFALSE(is_reusable (s, block, 1) == 0, "vs-4070: can not free such block"); + RFALSE(!th->t_super, "vs-4060: trying to free block on nonexistent device"); + RFALSE(is_reusable (th->t_super, block, 1) == 0, "vs-4070: can not free such block"); _reiserfs_free_block(th, block) ; } diff -Nru a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c --- a/fs/reiserfs/dir.c Fri Apr 5 14:16:14 2002 +++ b/fs/reiserfs/dir.c Fri Apr 5 14:16:14 2002 @@ -180,6 +180,7 @@ filp->f_pos = next_pos; pathrelse (&path_to_entry); reiserfs_check_path(&path_to_entry) ; + UPDATE_ATIME(inode) ; return 0; } diff -Nru a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c --- a/fs/reiserfs/inode.c Fri Apr 5 14:16:14 2002 +++ b/fs/reiserfs/inode.c Fri Apr 5 14:16:14 2002 @@ -745,8 +745,12 @@ if (retval) { if ( retval != -ENOSPC ) printk("clm-6004: convert tail failed inode %lu, error %d\n", inode->i_ino, retval) ; - if (allocated_block_nr) + if (allocated_block_nr) { + /* the bitmap, the super, and the stat data == 3 */ + journal_begin(&th, inode->i_sb, 3) ; reiserfs_free_block (&th, allocated_block_nr); + transaction_started = 1 ; + } goto failure ; } goto research ; @@ -933,9 +937,6 @@ // (directories and symlinks) struct stat_data * sd = (struct stat_data *)B_I_PITEM (bh, ih); - /* both old and new directories have old keys */ - //version = (S_ISDIR (sd->sd_mode) ? ITEM_VERSION_1 : ITEM_VERSION_2); - inode->i_mode = sd_v2_mode(sd); inode->i_nlink = sd_v2_nlink(sd); inode->i_uid = sd_v2_uid(sd); @@ -956,6 +957,7 @@ else set_inode_item_key_version (inode, KEY_FORMAT_3_6); REISERFS_I(inode)->i_first_direct_byte = 0; + set_inode_sd_version (inode, STAT_DATA_V2); } pathrelse (path); @@ -1218,7 +1220,8 @@ struct reiserfs_iget4_args *args; args = opaque; - return INODE_PKEY( inode ) -> k_dir_id == args -> objectid; + /* args is already in CPU order */ + return le32_to_cpu(INODE_PKEY(inode)->k_dir_id) == args -> objectid; } struct inode * reiserfs_iget (struct super_block * s, const struct cpu_key * key) diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c --- a/fs/reiserfs/super.c Fri Apr 5 14:16:14 2002 +++ b/fs/reiserfs/super.c Fri Apr 5 14:16:14 2002 @@ -765,7 +765,7 @@ if ( rs->s_v1.s_root_block == -1 ) { brelse(bh) ; printk("dev %s: Unfinished reiserfsck --rebuild-tree run detected. Please run\n" - "reiserfsck --rebuild-tree and wait for a completion. If that fais\n" + "reiserfsck --rebuild-tree and wait for a completion. If that fails\n" "get newer reiserfsprogs package\n", s->s_id); return 1; } BK changeset: This BitKeeper patch contains the following changesets: 1.588 ## Wrapped with gzip_uu ## begin 664 bkpatch2245 M'XL(`&6WK3P``[58:V_CMA+]'/V*N2E0)&ULBR(I2RX2)-W-MD'Z"/91H$`! M@9(HFXTL&J*<;'IU__L=4G(WWJ2)G:T=PV)LZ*:IJ+*AY682W-GAIF>X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U7!J[.SA8,^YL'`$Y1-*` MO[K9&&^6B'H>CTC$Q9N5,]VTRJ_L#/KE/@)$CHOO("!%R2RI#D.D'^)2IW M-<29'9ST2JQRY-"+>SWT<]LYQL:7^>OQ1?W8K#>A.XOO%Q\&GST*(C,HX]&. MF!'3$*AW$?,(^;&'J!-G+#%YTG8G=1F-B[K-Y2DH'3G6,%IK.N$K176XTZ!H)S.HC_>R`4_?EH"Z'8 MZI2V(?T>.:59:R'C_;,TRM;I%TZ"#31C9^>=YQ^&74)WQ'R"??VF7\2^L&.? MN\#::W]E'UO.`=8T=[P:V-.-8]JMP#J&F6.+HIXO2FFY,H2+`CF(_"OPK&/^ =J/8_/8'-9C*[-LOYL<`V+\K3POL_D.3+5_45```` ` end - 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/