[reiserfs-list] [toad: Reiserfs in 2.4.9-ac12 doesn't recognize -o rw]
ReiserFS in 2.4.9-ac12 does not recognize the options ro or rw, and refuses to mount partitions in fstab with those flags.
[reiserfs-list] SCSI error, kernel panic ...
Hi, I'm running linux kernel 2.4.6, reiserfs version 3.6.25 I've just recently seen the kernel panic, that sends the machine into an unusable state, my only option is to reboot. It seems like the reiserfs partition is corrupt. I can mount the drive and list all the files, I can even copy some of the files to another partition, but when I try to copy some of the files, I get this kernel panic. When I mount the partition first, there is the following error reiserfs: checking trans log (dev 08:0a) scsi0: ERROR on channel 0, id 0, lun 0, CDB: Read (10) 00 01 98 a8 8e 00 00 08 00 Info fld=0x198a893, Current sd08:0a: sense key Medium Error Additional sense indicates Unrecovered read error I/O error: dev 08:0a, sector 65680 Using tea hash to sort names reiserfs: using 3.5.x disk format ReiserFS version 3.6.25 Below is the kernel panic error Sep 14 11:20:38 kerry kernel: Unable to handle kernel NULL pointer dereference at virtual address 00 Sep 14 11:20:38 kerry kernel: printing eip: Sep 14 11:20:38 kerry kernel: c01935f5 Sep 14 11:20:38 kerry kernel: *pde = Sep 14 11:20:38 kerry kernel: Oops: Sep 14 11:20:38 kerry kernel: CPU:0 Sep 14 11:20:38 kerry kernel: EIP:0010:[c01935f5] Sep 14 11:20:38 kerry kernel: EFLAGS: 00010202 Sep 14 11:20:38 kerry kernel: eax: e084e000 ebx: dfa79400 ecx: 0001 edx: Sep 14 11:20:38 kerry kernel: esi: 000b edi: 000f ebp: e084e108 esp: c18b3edc Sep 14 11:20:38 kerry kernel: ds: 0018 es: 0018 ss: 0018 Sep 14 11:20:38 kerry kernel: Process kupdated (pid: 6, stackpage=c18b3000) Sep 14 11:20:38 kerry kernel: Stack: 0003 0108 0108 c0193b62 dfa79400 000f 000b Sep 14 11:20:38 kerry kernel:0108 0108 0108 e084e148 0008 c019 Sep 14 11:20:38 kerry kernel:dfa79400 e084e108 0001 c18b3f98 c18b2332 c028af56 dfa79400 Sep 14 11:20:38 kerry kernel: Call Trace: [c0193b62] [c019712e] [c0195dff] [c0187768] [c01349f3 Sep 14 11:20:38 kerry kernel:[c01054cc] Sep 14 11:20:38 kerry kernel: Sep 14 11:20:38 kerry kernel: Code: f6 42 18 04 74 2d 8b 42 18 a8 04 74 09 52 e8 58 d1 f9 ff 83 Sep 14 11:46:08 kerry -- MARK -- So, my last option now is to run reiserfsck --rebuild-tree ... I tried reiserfsck by itself, and reiserfsck --skip-journal ... and both of those die without completing (or fixing) Is --rebuild-tree a safe option? It's like there are bad blocks on the drive, is there anyway of moving data around these bad blocks? cheers E
[reiserfs-list] [PATCH]: A-reiserfs-i_flags.patch
Hello, Alan, in reiserfs-specific part of inode there are several fields that are actually used as single-bit flags. This patch, replaces them with single bit-field. Please, apply. Nikita. diff -rup linux/fs/reiserfs/file.c linux.patched/fs/reiserfs/file.c --- linux/fs/reiserfs/file.cThu Sep 20 21:26:39 2001 +++ linux.patched/fs/reiserfs/file.cThu Sep 20 19:17:11 2001 @@ -33,7 +33,7 @@ static int reiserfs_file_release (struct /* fast out for when nothing needs to be done */ if ((atomic_read(inode-i_count) 1 || - !inode-u.reiserfs_i.i_pack_on_close || + !(inode-u.reiserfs_i.i_flags i_pack_on_close_mask) || !tail_has_to_be_packed(inode)) inode-u.reiserfs_i.i_prealloc_count = 0) { return 0; @@ -50,7 +50,7 @@ static int reiserfs_file_release (struct journal_end(th, inode-i_sb, JOURNAL_PER_BALANCE_CNT * 3) ; if (atomic_read(inode-i_count) = 1 - inode-u.reiserfs_i.i_pack_on_close + (inode-u.reiserfs_i.i_flags i_pack_on_close_mask) tail_has_to_be_packed (inode)) { /* if regular file is released by last holder and it has been appended (we append by unformatted node only) or its direct @@ -96,20 +96,20 @@ static int reiserfs_setattr(struct dentr /* version 2 items will be caught by the s_maxbytes check ** done for us in vmtruncate */ -if (inode_item_key_version(inode) == KEY_FORMAT_3_5 +if (get_inode_item_key_version(inode) == KEY_FORMAT_3_5 attr-ia_size MAX_NON_LFS) return -EFBIG ; } if (attr-ia_valid ATTR_UID) { - if ((attr-ia_uid ~0x) inode_sd_version (inode) == STAT_DATA_V1) { + if ((attr-ia_uid ~0x) get_inode_sd_version (inode) == STAT_DATA_V1) { /* stat data of format v1 has 16 bit uid */ return -EINVAL; } } if (attr-ia_valid ATTR_GID) { - if ((attr-ia_gid ~0x) inode_sd_version (inode) == STAT_DATA_V1) { + if ((attr-ia_gid ~0x) get_inode_sd_version (inode) == STAT_DATA_V1) { /* stat data of format v1 has 16 bit gid */ return -EINVAL; } diff -rup linux/fs/reiserfs/inode.c linux.patched/fs/reiserfs/inode.c --- linux/fs/reiserfs/inode.c Thu Sep 20 21:26:39 2001 +++ linux.patched/fs/reiserfs/inode.c Thu Sep 20 19:17:11 2001 @@ -69,7 +72,7 @@ static void _make_cpu_key (struct cpu_ke void make_cpu_key (struct cpu_key * key, const struct inode * inode, loff_t offset, int type, int length) { - _make_cpu_key (key, inode_item_key_version (inode), + _make_cpu_key (key, get_inode_item_key_version (inode), le32_to_cpu (INODE_PKEY (inode)-k_dir_id), le32_to_cpu (INODE_PKEY (inode)-k_objectid), offset, type, length); @@ -182,7 +185,7 @@ static inline void set_block_dev_mapped // static int file_capable (struct inode * inode, long block) { -if (inode_item_key_version (inode) != KEY_FORMAT_3_5 || // it is new file. +if (get_inode_item_key_version (inode) != KEY_FORMAT_3_5 || // it is new file. block (1 (31 - inode-i_sb-s_blocksize_bits))) // old file, but 'block' is inside of 2gb return 1; @@ -662,7 +665,7 @@ static inline int _allocate_block(struct /* key of item to be inserted */ tmp_key = *key; /* ih of indirect item to be inserted */ - make_le_item_head (tmp_ih, key, inode_item_key_version (inode), 1, TYPE_INDIRECT, + make_le_item_head (tmp_ih, key, get_inode_item_key_version (inode), 1, +TYPE_INDIRECT, UNFM_P_SIZE, 0/* free_space */); /* item itself */ unp = cpu_to_le32 (block); @@ -832,7 +835,7 @@ int reiserfs_get_block (struct inode * i /* bad */ lock_kernel() ; th.t_trans_id = 0 ; -version = inode_item_key_version (inode); +version = get_inode_item_key_version (inode); if (!file_capable (inode, block)) { unlock_kernel() ; @@ -851,7 +854,7 @@ int reiserfs_get_block (struct inode * i return ret; } -inode-u.reiserfs_i.i_pack_on_close = 1 ; +inode-u.reiserfs_i.i_flags |= i_pack_on_close_mask; windex = push_journal_writer(reiserfs_get_block) ; @@ -1039,8 +1042,8 @@ static void init_inode (struct inode * i struct stat_data_v1 * sd = (struct stat_data_v1 *)B_I_PITEM (bh, ih); unsigned long blocks; -inode_item_key_version (inode) = KEY_FORMAT_3_5; - inode_sd_version (inode) = STAT_DATA_V1; +set_inode_item_key_version (inode, KEY_FORMAT_3_5); + set_inode_sd_version (inode, STAT_DATA_V1); inode-i_mode = sd_v1_mode(sd); inode-i_nlink = sd_v1_nlink(sd); inode-i_uid = sd_v1_uid(sd); @@ -1088,13 +1091,13 @@ static void init_inode (struct inode * i if (S_ISDIR (inode-i_mode) || S_ISLNK (inode-i_mode)) /* items of
Re: [reiserfs-list] Problems with reiserfs
On Fre, 21 Sep 2001, Leandro Lucarella wrote: the root partition), I get some errors about bitmaps (I couldn't get the errors to post it here because I lost the log. What I do is start the system with a rescue disk, I backup all my root partition data (I can copy the data without lost! this is weird), depending on how these bitmap errors were, this could just mean that you lost a bit of disk space (there was a problem that when a machine crashed with an unlinked file in use (zombie file) the allocated space was not restored upon journal replay. If thats the case you're not really hitting a reiserfs problem here. BTW, are you using ppp ? Dirk
Re: [reiserfs-list] Re: [PATCH] Significant performace improvements on reiserfs systems
In Solaris, before spinning on a busy spin-lock, thread checks whether spin-lock holder runs on the same processor. If so, thread goes to sleep and holder wakes it up on spin-lock release. The same, I guess is going for interrupts that are served as separate threads. This way, one can re-schedule with spin-locks held. This is one of the things interrupt handling by threads gives you, but the performance cost is not nice. When you consider that ksoftirqd when it kicks in (currently far too often) takes up to 10% off gigabit ethernet performance, you can appreciate why we don't want to go that path. Our spinlock paths are supposed to be very small and predictable. Where there is sleeping involved we have semaphores. As lockmeter shows we still have a few io_request_lock cases at least where we lock for far too long Alan
[reiserfs-list] Re: [PATCH] Preemption Latency Measurement Tool
Am Freitag, 21. September 2001 18:18 schrieb Stefan Westerfeld: Hi! On Fri, Sep 21, 2001 at 02:42:56AM +0200, Roger Larsson wrote: You might try stracing artsd to see if it hangs at a particular syscall. Use -tt or -r for timestamps and pipe the output through tee (to a file on your ramfs). I tried playing a mp3 with noatun via artsd. Starting dbench 32 I get the same kind of dropouts - and no indication with my latency profiling patch = no process with higher prio is waiting to run! One of noatun or artsd is waiting for something else! (That is why I included Stefan Westerfeld... artsd) I noticed very nice improvement then reniceing (all) artsd and noatun. (I did also change the buffer size in artsd down to 40 ms) (This part most for Stefan... So I thought - lets try to run artsd with RT prio - changed the option HOW can it get RT prio when it is not suid? I guess it can not... So I manually added suid bit - but then noatun could not connect with artsd... bug?, backed out the suid change... but is behaves as it works, could be that it has so short bursts that prio never get a chance to drop) If you want to run artsd with RT prio, add suid root to artswrapper if it is not already there - it should by default, but some distributors/packagers don't get this right. If you start artsd via kcminit, check the realtime checkbox, if you do manually, run artswrapper instead of artsd, i.e. Thank you very much Stefan! I've an updated SuSE 7.1 (KDE-2.2.1, etc.) apart from my kernel and XFree86 DRI hacking running, here. SuSE missed the suid root on artswrapper (security). I've changed it. -rwxr-xr-x1 root root 211892 Sep 15 22:59 /opt/kde2/bin/artsbuilder -rwxr-xr-x1 root root 690 Sep 15 20:19 /opt/kde2/bin/artsc-config -rwxr-xr-x1 root root30388 Sep 15 20:48 /opt/kde2/bin/artscat -rwxr-xr-x1 root root 157576 Sep 15 23:00 /opt/kde2/bin/artscontrol -rwxr-xr-x1 root root 125040 Sep 15 20:48 /opt/kde2/bin/artsd -rwxr-xr-x1 root root 2271 Sep 15 20:19 /opt/kde2/bin/artsdsp -rwxr-xr-x1 root root 8568 Sep 15 20:50 /opt/kde2/bin/artsmessage -rwxr-xr-x1 root root17924 Sep 15 20:48 /opt/kde2/bin/artsplay -rwxr-xr-x1 root root30396 Sep 15 20:49 /opt/kde2/bin/artsshell -rwsr-xr-x1 root root 4452 Sep 15 20:48 /opt/kde2/bin/artswrapper After that I've tested, again. This time 2.4.10-pre10 + patch-rml-2.4.10-pre12-preempt-kernel-1 + patch-rml-2.4.10-pre12-preempt-stats-1 + journal.c (from Chris Mason) dbench 32 Throughput 26.485 MB/sec (NB=33.1062 MB/sec 264.85 MBit/sec) 15.070u 60.340s 2:40.50 46.9% 0+0k 0+0io 911pf+0w max load: 2936 Artsd daemon wait in wait_on_b (WCHAN), D state (STAT) during the hiccup (for nearly 3 seconds). The hiccup appears at the beginning of dbench (after 9-10 seconds). I've noticed no other hiccup. snapshot 9:33pm up 2:03, 1 user, load average: 27.28, 10.53, 5.87 122 processes: 112 sleeping, 10 running, 0 zombie, 0 stopped CPU states: 15.4% user, 43.2% system, 0.0% nice, 41.3% idle Mem: 642840K av, 607640K used, 35200K free, 0K shrd, 20244K buff Swap: 1028120K av, 196K used, 1027924K free 465668K cached PID USER PRI NI PAGEIN SIZE SWAP RSS SHARE WCHAN STAT %CPU %MEM TIME COMMA 7529 nuetzel 20 0 1274 71280 7128 4252 do_select S 2.7 1.1 0:05 artsd 7682 nuetzel 20 0 17 71280 7128 4252 rt_sigsus S 2.7 1.1 0:05 artsd 7725 nuetzel 18 0 25 5240 524 400 wait_on_b D 1.9 0.0 0:01 dbench 7726 nuetzel 19 0 25 5240 524 400 do_journa D 1.9 0.0 0:01 dbench 7727 nuetzel 18 0 25 5240 524 400 wait_on_b D 1.9 0.0 0:01 dbench 7724 nuetzel 18 0 25 5240 524 400 do_journa D 1.7 0.0 0:01 dbench 7729 nuetzel 18 0 25 5240 524 400 wait_on_b D 1.7 0.0 0:01 dbench 7730 nuetzel 18 0 25 5240 524 400 do_journa D 1.7 0.0 0:01 dbench 7737 nuetzel 18 0 25 5240 524 400 do_journa D 1.7 0.0 0:01 dbench 7738 nuetzel 18 0 25 5240 524 400 R 1.7 0.0 0:01 dbench 7731 nuetzel 18 0 25 5240 524 400 wait_on_b D 1.5 0.0 0:01 dbench 7732 nuetzel 18 0 25 5240 524 400 wait_on_b D 1.5 0.0 0:01 dbench 7733 nuetzel 18 0 25 5240 524 400 do_journa D 1.5 0.0 0:01 dbench 7734 nuetzel 18 0 25 5240 524 400 do_journa D 1.5 0.0 0:01 dbench 7735 nuetzel 18 0 25 5240 524 400 do_journa D 1.5 0.0 0:01 dbench 7736 nuetzel 18 0 25 5240 524 400 wait_on_b D 1.5 0.0 0:01 dbench 7740 nuetzel 18 0 25 5240 524 400 R 1.5 0.0 0:01 dbench
[reiserfs-list] [PATCH] 2.4.9-ac13 - parse_options() in reiserfs still broken
Hello! I'm a bit disappointed that the bug with option parsing in reiserfs wasn't fixed in 2.4.9-ac13. It's a serious issue that prevents mounting reiserfs partitions on system startup (except root partition). Anyway, I'm using this opportunity to send a better patch. The only difference is that the faulty code has been actually identified and fixed (do-while becomes while), not just worked around by a sanity check. pos is initialized with options, not NULL, because kgetopt() effectively does it anyway, but the value of pos is now used earlier. I also included fixes for the typos that I encountered while fixing and testing my patch. The patch has been tested by multiple mounting and unmounting a reiserfs partition with specific (notail) and generic (ro) flags in different combinations. Simplification of kgetopt() is possible, but I'm intentionally avoiding code changes other that the most urgent fix. The patch is also available here: http://www.red-bean.com/~proski/linux/reiserfs-parse.diff --- --- linux.orig/fs/reiserfs/super.c +++ linux/fs/reiserfs/super.c @@ -144,8 +144,8 @@ static int kgetopt (char * options, opt_ int len_arg; ptr1 = (*pos ? *pos : options); -ptr2 = NULL; /* here we will put pounter on '=' */ -ptr3 = NULL; /* here we will put pounter on ',' */ +ptr2 = NULL; /* here we will put pointer on '=' */ +ptr3 = NULL; /* here we will put pointer on ',' */ if (!options) return -1; @@ -164,7 +164,7 @@ static int kgetopt (char * options, opt_ } } if (!option_exists) { - printk (reiserfs kgetopt: there is not option %s\n, ptr1); + printk (reiserfs kgetopt: unrecognized option %s\n, ptr1); return -1; } if (ptr2) { @@ -213,7 +213,7 @@ static int parse_options ( { int c; char * arg = NULL; -char * pos = NULL; +char * pos = options; char * p = NULL; arg_desc_t hash[] = { {rupasov, FORCE_RUPASOV_HASH}, @@ -227,7 +227,7 @@ static int parse_options ( /* use default configuration: create tails, journaling on, no conversion to newest format */ return 1; -do { +while (*pos != '\0') { opt_desc_t opts[] = { {notail, 0, 0, NOTAIL}, {conv, 0, 0, REISERFS_CONVERT}, @@ -251,7 +251,7 @@ static int parse_options ( return 0; } } -} while (*pos != '\0'); +} return 1; } --- Regards, Pavel Roskin
[reiserfs-list] Re: [PATCH] 2.4.9-ac13 - parse_options() in reiserfs still broken
I'm a bit disappointed that the bug with option parsing in reiserfs wasn't fixed in 2.4.9-ac13. It's a serious issue that prevents mounting reiserfs partitions on system startup (except root partition). Please wait for -ac14. That has the next batch of fixes in from Hans Namesys guys