Jonáš Vidra wrote: [...] > > > The oops is probably not very useful, but here you are anyway: This is very useful. The attached patch should fix this oops. However, your partition remains inconsistent. I'll fix up fsck a bit later.. Thanks, Edward. > > Mar 27 01:55:01 [kernel] Kernel BUG at c10e0681 [verbose debug info > unavailable] [..] > Mar 27 01:55:01 [kernel] [<c10e0890>] ? > ctail_readpages_filler+0x149/0x195 > Mar 27 01:55:01 [kernel] [<c105d02f>] ? read_cache_pages+0x6d/0xca > Mar 27 01:55:01 [kernel] [<c10e0747>] ? ctail_readpages_filler+0x0/0x195 > Mar 27 01:55:01 [kernel] [<c10e03d7>] ? readpages_ctail+0x29f/0x2a8 > Mar 27 01:55:01 [kernel] [<c10d4030>] ? > readpages_cryptcompress+0x36/0x5b > Mar 27 01:55:01 [kernel] [<c10c82d3>] ? reiser4_readpages+0x26/0x2e > Mar 27 01:55:01 [kernel] [<c10c82ad>] ? reiser4_readpages+0x0/0x2e > Mar 27 01:55:01 [kernel] [<c105cc54>] ? > __do_page_cache_readahead+0xeb/0x160 > Mar 27 01:55:01 [kernel] [<c105cce0>] ? ra_submit+0x17/0x1c > Mar 27 01:55:01 [kernel] [<c105cef6>] ? ondemand_readahead+0x161/0x16d > Mar 27 01:55:01 [kernel] [<c105cf7a>] ? > page_cache_sync_readahead+0x16/0x1b > Mar 27 01:55:01 [kernel] [<c10580c7>] ? > generic_file_aio_read+0x1fe/0x550 > Mar 27 01:55:01 [kernel] [<c107857b>] ? do_sync_read+0xab/0xe9 > Mar 27 01:55:01 [kernel] [<c10385c3>] ? > autoremove_wake_function+0x0/0x33 > Mar 27 01:55:01 [kernel] [<c10d3d37>] ? read_cryptcompress+0x5f/0x7e > Mar 27 01:55:01 [kernel] [<c10d2335>] ? reiser4_read_careful+0xa9/0xf1 > Mar 27 01:55:01 [kernel] [<c10d228c>] ? reiser4_read_careful+0x0/0xf1 > Mar 27 01:55:01 [kernel] [<c1078fa7>] ? vfs_read+0x87/0x118 > Mar 27 01:55:01 [kernel] [<c10790d1>] ? sys_read+0x3b/0x60 > Mar 27 01:55:01 [kernel] [<c1002b0f>] ? sysenter_do_call+0x12/0x26 > Mar 27 01:55:01 [kernel] ---[ end trace 26ea3afca4e81c3e ]--- > >
Hanle the case of orphan unprepped disk cluster: return EIO and suggest fsck the partition instead of BUG_ON(1). Signed-off-by: Edward Shishkin <edward.shishkin@xxxxxxxxx> --- fs/reiser4/plugin/item/ctail.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) --- linux-2.6.33-reiser4.orig/fs/reiser4/plugin/item/ctail.c +++ linux-2.6.33-reiser4/fs/reiser4/plugin/item/ctail.c @@ -649,9 +649,11 @@ int do_readpage_ctail(struct inode * ino ret = ctail_read_disk_cluster(clust, inode, page, mode); assert("edward-212", PageLocked(page)); - if (ret) + if (ret) { + ClearPageUptodate(page); + SetPageError(page); return ret; - + } /* refresh bytes */ to_page = pbytes(page_index(page), inode); if (to_page == 0) { @@ -669,7 +671,13 @@ int do_readpage_ctail(struct inode * ino switch (clust->dstat) { case UNPR_DISK_CLUSTER: - BUG_ON(1); + warning("edward-1563", + "orphan unprepped cluster %lu (inode %lli). Fsck?", + clust->index, + (unsigned long long)get_inode_oid(inode)); + ClearPageUptodate(page); + SetPageError(page); + return -EIO; case TRNC_DISK_CLUSTER: /* * Race with truncate!