Hi!
On Sat, 29 Aug 2009 12:48:03 -0400, Jérôme Poulin wrote:
> I just found out there were 3 bad sectors on my hard drive, however
> I just changed it last night, it copied over with only a missing
> 4096 bytes. NILFS was the only filesystem who experienced problem
> with those bad sectors, thanks to it's log-like structure which
> seems to be able to discover to kind of errors. It woulnd't mount
> yesterday, I copied it over, then started it this morning thinking
> the segctord problem could have been caused by that, however it is
> not, I experienced it again this morning, it started then ended
> while I was eating, so I could capture the log from start to end
> this time, so this could give you a hint on what caused it, and it
> seems me and Eric are using a 64 bits kernel too.
>
> Summary of log:
> Aug 28 21:03: I started my computer and it wouldn't start X, looked at the
> log, it was showing I wasn't having a /home.
> Rebooted with init=3D/bin/bash and found out disk had bad sectors, copied o=
ver a new HD.
> Aug 29 10:41 Rebooted with new disk, everything's okay.
> Aud 29 12:08 WARNING: at kernel/sched.c:4890 sub_preempt_count+0x95/0xa0(),
start of errors.
> Aug 29 12:29 End of errors.
Thank you for sending me the log.
I've found a bug which seems like the cause of this problem. The
following patch is the bugfix.
Could you test if the patch makes a difference ?
Thanks,
Ryusuke Konishi
diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c
index 7e0b61b..c668bca 100644
--- a/fs/nilfs2/btnode.c
+++ b/fs/nilfs2/btnode.c
@@ -209,6 +209,7 @@ int nilfs_btnode_prepare_change_key(struct address_space
*btnc,
* We cannot call radix_tree_preload for the kernels older
* than 2.6.23, because it is not exported for modules.
*/
+retry:
err = radix_tree_preload(GFP_NOFS & ~__GFP_HIGHMEM);
if (err)
goto failed_unlock;
@@ -219,7 +220,6 @@ int nilfs_btnode_prepare_change_key(struct address_space
*btnc,
(unsigned long long)oldkey,
(unsigned long long)newkey);
-retry:
spin_lock_irq(&btnc->tree_lock);
err = radix_tree_insert(&btnc->page_tree, newkey, obh->b_page);
spin_unlock_irq(&btnc->tree_lock);
_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users