Re: deadlock produced by reiser4-patch

2006-12-15 Thread Johannes Hirte
Am Donnerstag, 14. Dezember 2006 23:01 schrieben Sie:

 Nup.
 This patch also contains changes which drop spin_lock/unlock(inode_lock)
 in sync_inodes_sb()

You're right, this part is only missing on my system. Seems that something 
went horribly here, when patching the sources. Sorry for the false alert.


deadlock produced by reiser4-patch

2006-12-14 Thread Johannes Hirte
The reiser4-patch for 2.6.18 (also included in the mm-tree) contains some 
changes to sync_sb_inodes, which produces a deadlock on SMP-configured 
kernels.

diff -urN linux-2.6.18.orig/fs/fs-writeback.c linux-2.6.18/fs/fs-writeback.c
--- linux-2.6.18.orig/fs/fs-writeback.c 2006-11-20 00:43:20.178243289 +0300
+++ linux-2.6.18/fs/fs-writeback.c  2006-11-19 17:36:10.394665097 +0300
@@ -286,8 +286,6 @@
  * WB_SYNC_HOLD is a hack for sys_sync(): reattach the inode to sb-s_dirty 
so
  * that it can be located for waiting on in __writeback_single_inode().
  *
- * Called under inode_lock.
- *
  * If `bdi' is non-zero then we're being asked to writeback a specific queue.
  * This function assumes that the blockdev superblock's inodes are backed by
  * a variety of queues, so all inodes are searched.  For other superblocks,
@@ -303,11 +301,13 @@
  * on the writer throttling path, and we get decent balancing between many
  * throttled threads: we don't want them all piling up on __wait_on_inode.
  */
-static void
-sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
+void
+generic_sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
 {
const unsigned long start = jiffies;/* livelock avoidance */
 
+   spin_lock(inode_lock);
+
if (!wbc-for_kupdate || list_empty(sb-s_io))
list_splice_init(sb-s_dirty, sb-s_io);
 
@@ -387,8 +387,19 @@
if (wbc-nr_to_write = 0)
break;
}
+   spin_unlock(inode_lock);
return; /* Leave any unwritten inodes on s_io */
 }
+EXPORT_SYMBOL(generic_sync_sb_inodes);
+
+static void
+sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
+{
+   if (sb-s_op-sync_inodes)
+   sb-s_op-sync_inodes(sb, wbc);
+   else
+   generic_sync_sb_inodes(sb, wbc);
+}

The spinlock, which is introduced here, is already held by sync_inodes_sb, 
which themselve call sync_sb_inodes, the system hangs here. 


Re: reiser4 experimental patch

2006-11-10 Thread Johannes Hirte
Am Freitag, 10. November 2006 00:39 schrieb [EMAIL PROTECTED]:
 thanks for answer! :)

 so, the patch compiles fine (one warning in super_ops.c), the FS boot
 correctly, but if i execute for exemple startx, kernel panic! i compile
 reiser4 built in with debug, i will send the error (kernel panic) to the
 list tomorow because i'm now in my house, and the experinet is on my work
 computer :)

I didn't look closer on your patch, but you shouldn't get a warning in 
super_ops.c. Which compiler do you use?
Can you try the patch, I've made?
http://www.stud.tu-ilmenau.de/~johi-in/patch-reiser4-2.6.18.bz2


Re: Reiser4: Running out of room still causes corruption

2006-10-17 Thread Johannes Hirte
Am Dienstag, 10. Oktober 2006 07:48 schrieb Daniel Kasak:
 Hi all.

 I'd had more problems with filesystem corruption after running out of
 space.

I was able to reproduce this error and log the oops:

Oct 16 01:00:01 Theben cron[22195]: (root) CMD 
(rm -f /var/spool/cron/lastrun/cron.hourly)
Oct 16 01:03:08 Theben reiser4[kio_file(10493)]: extent2tail 
(fs/reiser4/plugin/file/tail_conversion.c:714)[nikita-2282]:
Oct 16 01:03:08 Theben WARNING: Partial conversion of 65795: 3 of 4: -28
Oct 16 01:03:08 Theben reiser4[kio_file(10493)]: release_unix_file 
(fs/reiser4/plugin/file/file.c:2268)[nikita-3233]:
Oct 16 01:03:08 Theben WARNING: Failed (-28) to convert in release_unix_file 
(65795)
Oct 16 01:04:23 Theben Unable to handle kernel NULL pointer dereference at 
0048 RIP:
Oct 16 01:04:23 Theben [8022e638] 
truncate_inode_pages_range+0x18/0x2d0
Oct 16 01:04:23 Theben PGD 3f5c1067 PUD 349e5067 PMD 0
Oct 16 01:04:23 Theben Oops:  [1] PREEMPT
Oct 16 01:04:23 Theben CPU 0
Oct 16 01:04:23 Theben Modules linked in: usblp nvidia sym53c8xx ehci_hcd 
ohci_hcd uhci_hcd
Oct 16 01:04:23 Theben Pid: 24786, comm: konqueror Tainted: P  
2.6.18-reiser4 #1
Oct 16 01:04:23 Theben RIP: 0010:[8022e638]  [8022e638] 
truncate_inode_pages_range+0x18/0x2d0
Oct 16 01:04:23 Theben RSP: :8100328f7348  EFLAGS: 00010296
Oct 16 01:04:23 Theben RAX:  RBX: 810001585548 RCX: 
0001
Oct 16 01:04:23 Theben RDX: 3fff RSI: 3000 RDI: 

Oct 16 01:04:23 Theben RBP: 81000d2b7440 R08:  R09: 
81002c41ab38
Oct 16 01:04:23 Theben R10: 0040 R11: 0040 R12: 
0003
Oct 16 01:04:23 Theben R13: 0001 R14:  R15: 

Oct 16 01:04:23 Theben FS:  2b530b62f260() GS:807ca000() 
knlGS:f65f8ba0
Oct 16 01:04:23 Theben CS:  0010 DS:  ES:  CR0: 8005003b
Oct 16 01:04:23 Theben CR2: 0048 CR3: 2e6d5000 CR4: 
06e0
Oct 16 01:04:23 Theben Process konqueror (pid: 24786, threadinfo 
8100328f6000, task 8100224387e0)
Oct 16 01:04:23 Theben Stack:  3000 0003 
 
Oct 16 01:04:23 Theben 000160d2 0046  
0046
Oct 16 01:04:23 Theben 81003dcb9090 0292 81003dcb9090 
00011210
Oct 16 01:04:23 Theben Call Trace:
Oct 16 01:04:23 Theben [803263e8] 
reiser4_invalidate_pages+0x198/0x240
Oct 16 01:04:23 Theben [8034f0c1] item_body_by_coord_hard+0x11/0x20
Oct 16 01:04:23 Theben [80349ede] extent_size+0x1e/0x60
Oct 16 01:04:23 Theben [80349f94] max_unit_key_extent+0x34/0x60
Oct 16 01:04:23 Theben [8034f096] max_item_key_by_coord+0x36/0x50
Oct 16 01:04:23 Theben [8034a378] kill_hook_extent+0x368/0x490
Oct 16 01:04:23 Theben [8032abe6] reiser4_get_neighbor+0xa6/0x4b0
Oct 16 01:04:23 Theben [8034a010] kill_hook_extent+0x0/0x490
Oct 16 01:04:23 Theben [8033e7e2] call_kill_hooks+0x82/0xa0
Oct 16 01:04:23 Theben [8034f096] max_item_key_by_coord+0x36/0x50
Oct 16 01:04:23 Theben [8033f173] prepare_for_compact+0x4a3/0x7e0
Oct 16 01:04:23 Theben [8033e690] kill_units+0x0/0xa0
Oct 16 01:04:23 Theben [80341060] kill_tail+0x0/0x50
Oct 16 01:04:23 Theben [8033e730] kill_head+0x0/0x30
Oct 16 01:04:23 Theben [803156fd] move_lh_internal+0x13d/0x1a0
Oct 16 01:04:23 Theben [80310470] jload_gfp+0x1c0/0x1f0
Oct 16 01:04:23 Theben [8031245c] lock_carry_node+0x2cc/0x330
Oct 16 01:04:23 Theben [80323f4f] handle_eottl+0x5f/0x790
Oct 16 01:04:23 Theben [8033f5cc] kill_node40+0x3c/0xe0
Oct 16 01:04:23 Theben [803134cd] carry_cut+0x4d/0x60
Oct 16 01:04:23 Theben [80312eea] carry+0xda/0x2b0
Oct 16 01:04:23 Theben [80312594] post_carry+0x54/0xd0
Oct 16 01:04:23 Theben [80317b7f] kill_node_content+0x72f/0x7d0
Oct 16 01:04:23 Theben [80315e8e] longterm_lock_znode+0x3de/0x510
Oct 16 01:04:23 Theben [80325dec] coord_by_handle+0x36c/0x3a0
Oct 16 01:04:23 Theben [80341660] lookup_node40+0x320/0x450
Oct 16 01:04:23 Theben [80310470] jload_gfp+0x1c0/0x1f0
Oct 16 01:04:23 Theben [803185af] cut_tree_worker_common+0x27f/0x370
Oct 16 01:04:23 Theben [8032f0f3] plugin_by_unsafe_id+0x23/0x100
Oct 16 01:04:23 Theben [80318330] cut_tree_worker_common+0x0/0x370
Oct 16 01:04:23 Theben [803164c9] cut_tree_object+0x129/0x220
Oct 16 01:04:23 Theben [8031c01e] znode_make_dirty+0x7e/0xc0
Oct 16 01:04:23 Theben [8031a305] reiser4_grab_space+0x45/0xa0
Oct 16 01:04:23 Theben [8031a5ea] reiser4_grab_reserved+0xaa/0x170
Oct 16 01:04:23 Theben [803340fe] cut_file_items+0x12e/0x1d0
Oct 16 01:04:23 Theben [80335020] update_file_size+0x0/0x90