From: Josef Bacik <josef@redhat.com>
To: Mathieu Chouquet-Stringer <mathieucs@gmail.com>
Cc: Mathieu Chouquet-Stringer <mathieu@csetco.com>,
dave@jikos.cz, linux-btrfs@vger.kernel.org
Subject: Re: Btrfs bug with g38867a2 and a question
Date: Thu, 22 Sep 2011 10:12:12 -0400 [thread overview]
Message-ID: <4E7B423C.2080007@redhat.com> (raw)
In-Reply-To: <CALiWzOg8CQJF7OfMex1uJTa+doDZ8oufV1nAbos99Z4ev-+xKg@mail.gmail.com>
On 09/22/2011 02:05 AM, Mathieu Chouquet-Stringer wrote:
>
> On Sep 22, 2011 1:11 AM, "David Sterba" <dave@jikos.cz
> <mailto:dave@jikos.cz>> wrote:
>>
>> On Wed, Sep 21, 2011 at 04:18:29PM -0400, Josef Bacik wrote:
>> > diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
>> > index b128fa0..66ba0a7 100644
>> > --- a/fs/btrfs/inode.c
>> > +++ b/fs/btrfs/inode.c
>> > @@ -782,7 +782,12 @@ static noinline int cow_file_range(struct inode
> *inode,
>> > struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
>> > int ret = 0;
>> >
>> > - BUG_ON(btrfs_is_free_space_inode(root, inode));
>> > + if (btrfs_is_free_space_inode(root, inode)) {
>> > + printk(KERN_ERR "trying to write to free space inode, "
>> > + "isize=%Lu, start=%Lu, end=%Lu\n",
> i_size_read(inode),
>> > + start, end);
>>
>> please prefix printk messages with "btrfs: "
>
> Well this time it doesn't boot anymore...
> Bug at fs/btrfs/free-space-cache.c:1327
>
> I had another crash before being able to reboot...
>
> Is there a way to recover from that? How do I disable space cache?
>
Well that is from the tree logging code, so give this a whirl. It's
going to dump a lot of info so make sure you capture everything before
the --- cut here --- line. Thanks,
Josef
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 1bcbe76..236a938 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -417,6 +417,8 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info,
}
if (entry->type == BTRFS_FREE_SPACE_EXTENT) {
+ printk(KERN_ERR "adding extent [%llu-%llu]\n",
+ e->offset, e->bytes);
spin_lock(&block_group->tree_lock);
ret = link_free_space(block_group, e);
spin_unlock(&block_group->tree_lock);
@@ -431,6 +433,8 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info,
page_cache_release(page);
goto free_cache;
}
+ printk(KERN_ERR "adding bitmap [%llu-%llu]\n",
+ e->offset, e->bytes);
spin_lock(&block_group->tree_lock);
ret = link_free_space(block_group, e);
block_group->total_bitmaps++;
next prev parent reply other threads:[~2011-09-22 14:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 18:53 Btrfs bug with g38867a2 and a question Mathieu Chouquet-Stringer
2011-09-21 20:18 ` Josef Bacik
2011-09-21 20:35 ` Mathieu Chouquet-Stringer
2011-09-21 23:10 ` David Sterba
2011-09-22 10:13 ` Mathieu Chouquet-Stringer
2011-09-22 11:05 ` David Sterba
2011-09-22 11:35 ` Mathieu Chouquet-Stringer
[not found] ` <CALiWzOg8CQJF7OfMex1uJTa+doDZ8oufV1nAbos99Z4ev-+xKg@mail.gmail.com>
2011-09-22 14:12 ` Josef Bacik [this message]
2011-09-22 15:16 ` Mathieu Chouquet-Stringer
2011-09-22 18:22 ` Mathieu Chouquet-Stringer
2011-09-22 19:00 ` Josef Bacik
2011-09-22 19:30 ` Mathieu Chouquet-Stringer
2011-09-22 20:32 ` Mathieu Chouquet-Stringer
2011-09-23 12:55 ` Mathieu Chouquet-Stringer
2011-09-23 14:49 ` Josef Bacik
2011-09-23 15:31 ` Mathieu Chouquet-Stringer
2011-09-23 15:34 ` Josef Bacik
2011-09-23 17:16 ` Mathieu Chouquet-Stringer
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=4E7B423C.2080007@redhat.com \
--to=josef@redhat.com \
--cc=dave@jikos.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=mathieu@csetco.com \
--cc=mathieucs@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.