2008/3/15, fdbugs <fdbugs@dupoux.com>:> Hi,
>
> I recompiled my kernel today, and when the btrfs-0.13 option is
> enabled (CONFIG_BTR_FS=y) I cannot boot on my reiserfs-3.6 partition
> any more. The kernel says that is cannot mount /dev/sdc6. I can boot
> the kernel when I recompile it with the same options and
> CONFIG_BTR_FS=n, and with the same boot options as well. Everything is
> amd64 on my system (kernel + programs).
>
> Here is a screenshot of the error:
> http://temp.dupoux.com/btrfs/btrfs-0.13-bug-reiserfs.png
>
> Here are my kernel options (it's 2.6.24.3 with several patches)
> http://temp.dupoux.com/btrfs/btrfs-0.13-bug-reiserfs-working.cfg (the
> one with CONFIG_BTR_FS=n that works)
>
> Here are the kernel patches I am using:
> http://temp.dupoux.com/btrfs/patches/
>
> Thanks
>
This bug is caused by wrong error code. btrfs_fill_super should return
-EINVAL instead of -EIO when no btrfs found on the device. Please try
the patch attached below.
Regards
YZ
---
diff -r e4cd88595ed7 disk-io.c
--- a/disk-io.c Thu Feb 21 14:54:12 2008 -0500
+++ b/disk-io.c Sat Mar 15 23:44:53 2008 +0800
@@ -635,7 +635,7 @@ struct btrfs_root *open_ctree(struct sup
struct btrfs_fs_info *fs_info = kmalloc(sizeof(*fs_info),
GFP_NOFS);
int ret;
- int err = -EIO;
+ int err = -EINVAL;
struct btrfs_super_block *disk_super;
if (!extent_root || !tree_root || !fs_info) {
diff -r e4cd88595ed7 super.c
--- a/super.c Thu Feb 21 14:54:12 2008 -0500
+++ b/super.c Sat Mar 15 23:44:53 2008 +0800
@@ -232,9 +232,9 @@ static int btrfs_fill_super(struct super
tree_root = open_ctree(sb);
- if (!tree_root || IS_ERR(tree_root)) {
+ if (IS_ERR(tree_root)) {
printk("btrfs: open_ctree failed\n");
- return -EIO;
+ return PTR_ERR(tree_root);
}
sb->s_fs_info = tree_root;
disk_super = &tree_root->fs_info->super_copy;