From: Josef Bacik <jbacik@fusionio.com>
To: "Szőts Ákos" <szotsaki@gmail.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Kernel bug on mismatching generation_v2 in inode.c:835
Date: Tue, 26 Mar 2013 10:48:55 -0400 [thread overview]
Message-ID: <20130326144855.GM1955@localhost.localdomain> (raw)
In-Reply-To: <CAAr69zZ7OpGpT7qcKdWA0k_0MR-wbhd-+EFGBQ+TQ5CycM8GDg@mail.gmail.com>
On Tue, Mar 26, 2013 at 08:33:27AM -0600, Szőts Ákos wrote:
> Dear list members,
>
> In my previous thread at
> http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg23333.html
> there was a space_cache kernel bug/panic on kernel 3.8. I could
> successfully "fix" that with rebuilding the cache. But some files were
> missing/corrupted. So I booted a rescue CD with kernel 3.7 and ran
> btrfsck --repair, which repaired quite a few things.
>
> After a reboot I got the following message:
> [ 469.457386] btrfs: disk space caching is enabled
> [ 469.503612] btrfs: mismatching generation and generation_v2 found
> in root item. This root was probably mounted with an older kernel.
> Resetting all new fields.
>
> As soon as anything had wanted to read a bit from the file system, the
> hard drive went crazy and was working for 5-10 minutes. After I got a
> kernel panic which said there's an error in fs/btrfs/inode.c:835.
>
> In the moment I don't just mount, but want to read something from the
> mounted file system under the rescue system, the same procedure
> happens.
>
> I made some pictures of it (since I cannot read anything from the
> logs, if there are any).
> You can find them here: www.morrohun.hu/temp/btrfs/v2/[123].jpg
>
> I wanted to create an image with the aforementined btrfs-image tool,
> but yet to have any success .
>
> Could you please give me an advice what can I do now? Living on a
> live-CD is not a life insurance :)
>
> Best regards,
>
Ok I'd like to get btrfs-image working so I can run fsck on it here locally and
see what's wrong. Can you apply this patch to my tree and rebuild and run
btrfs-image again, it should tell us why it's having trouble opening the device.
It also fixes that slight mkfs not compiling problem ;). Thanks,
Josef
diff --git a/disk-io.c b/disk-io.c
index 72b33da..6d879c5 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1047,7 +1047,8 @@ struct btrfs_fs_info *open_ctree_fs_info(const char *filename,
fp = open(filename, flags, 0600);
if (fp < 0) {
- fprintf (stderr, "Could not open %s\n", filename);
+ fprintf (stderr, "Could not open %s, %d (%s)\n", filename,
+ errno, strerror(errno));
return NULL;
}
info = __open_ctree_fd(fp, filename, sb_bytenr, 0, writes, partial);
diff --git a/mkfs.c b/mkfs.c
index bc68350..003a8fa 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -296,7 +296,7 @@ static int create_raid_groups(struct btrfs_trans_handle *trans,
if (!mixed) {
u64 total_bytes =
- btrfs_super_total_bytes(root->fs_info->super_copy);
+ btrfs_super_total_bytes(&root->fs_info->super_copy);
u64 alloced_bytes = 0;
u64 alloc_flags = BTRFS_BLOCK_GROUP_ENOSPC |
(allowed & metadata_profile);
next prev parent reply other threads:[~2013-03-26 14:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 14:33 Kernel bug on mismatching generation_v2 in inode.c:835 Szőts Ákos
2013-03-26 14:48 ` Josef Bacik [this message]
2013-03-26 15:59 ` Szőts Ákos
2013-03-26 17:34 ` Josef Bacik
2013-03-26 18:17 ` Josef Bacik
2013-03-26 18:25 ` Szőts Ákos
2013-03-26 18:47 ` Josef Bacik
2013-03-27 11:51 ` Szőts Ákos
2013-03-27 12:49 ` Josef Bacik
2013-03-27 13:58 ` Josef Bacik
2013-03-27 13:59 ` Szőts Ákos
2013-03-27 18:33 ` Josef Bacik
2013-03-27 19:17 ` Szőts Ákos
2013-03-27 20:39 ` Josef Bacik
2013-03-27 20:52 ` Josef Bacik
2013-03-27 21:42 ` Szőts Ákos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130326144855.GM1955@localhost.localdomain \
--to=jbacik@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=szotsaki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.