All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Schmidt <list.btrfs@jan-o-sch.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs GPF in read_extent_buffer() while scrubbing with kernel 3.4.2
Date: Wed, 04 Jul 2012 13:26:46 +0200	[thread overview]
Message-ID: <4FF42876.8010309@jan-o-sch.net> (raw)
In-Reply-To: <20120704001713.GA8986@sli.dy.fi>

On 04.07.2012 02:17, Sami Liedes wrote:
> On Wed, Jul 04, 2012 at 01:47:56AM +0300, Sami Liedes wrote:
>> I've seen this before: An overly long "Modules linked in:" line causes
>> a large gap in netconsole output.
> 
> I managed to capture the entire output using netconsole by modifying
> the kernel to not output the list of modules.

Okay, thanks for the output. Can you please apply the patch below and capture
especially the line printed before the "cut here" line?

Thanks!
-Jan

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index c9018a0..beabe99 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4519,7 +4519,14 @@ void read_extent_buffer(struct extent_buffer *eb, void *dstv,
        size_t start_offset = eb->start & ((u64)PAGE_CACHE_SIZE - 1);
        unsigned long i = (start_offset + start) >> PAGE_CACHE_SHIFT;
 
-       WARN_ON(start > eb->len);
+       if (start > eb->len) {
+               printk(KERN_ERR "btrfs: invalid parameters for read_extent_buffer: start (%lu) > eb->len (%lu). eb start is %llu, level %d, generation %llu, nritems %d. len param %lu. debug %llu/%llu/%llu/%llu\n",
+                       start, eb->len, eb->start, btrfs_header_level(eb),
+                       btrfs_header_generation(eb), btrfs_header_nritems(eb),
+                       len,
+                       eb->debug[0], eb->debug[1], eb->debug[2], eb->debug[3]);
+               WARN_ON(1);
+       }
        WARN_ON(start + len > eb->start + eb->len);
 
        offset = (start_offset + start) & ((unsigned long)PAGE_CACHE_SIZE - 1);
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index b516c3b..1bbf823 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -164,6 +164,8 @@ struct extent_buffer {
        wait_queue_head_t lock_wq;
        struct page *inline_pages[INLINE_EXTENT_BUFFER_PAGES];
        struct page **pages;
+
+       u64 debug[4];
 };
 
 static inline void extent_set_compress_type(unsigned long *bio_flags,
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index ac5d010..d9c1146 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -168,10 +168,15 @@ static int __readahead_hook(struct btrfs_root *root, struct extent_buffer *eb,
                struct btrfs_key key;
                struct btrfs_key next_key;
 
+               eb->debug[0] = 1;
+               eb->debug[1] = i;
+               eb->debug[2] = nritems;
+               eb->debug[3] = generation;
                btrfs_node_key_to_cpu(eb, &key, i);
-               if (i + 1 < nritems)
+               if (i + 1 < nritems) {
+                       eb->debug[0] = 2;
                        btrfs_node_key_to_cpu(eb, &next_key, i + 1);
-               else
+               } else
                        next_key = re->top;
                bytenr = btrfs_node_blockptr(eb, i);
                n_gen = btrfs_node_ptr_generation(eb, i);

  reply	other threads:[~2012-07-04 11:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-02 23:01 btrfs GPF in read_extent_buffer() while scrubbing with kernel 3.4.2 Sami Liedes
2012-07-02 23:08 ` Sami Liedes
2012-07-03 13:11 ` Jan Schmidt
2012-07-03 13:58   ` Sami Liedes
2012-07-03 14:35     ` Jan Schmidt
2012-07-03 22:47       ` Sami Liedes
2012-07-04  0:17         ` Sami Liedes
2012-07-04 11:26           ` Jan Schmidt [this message]
2012-07-04 16:03             ` Sami Liedes
2012-07-04 16:38               ` Jan Schmidt
2012-07-04 20:24                 ` Sami Liedes
2012-07-05 13:41                   ` Jan Schmidt
2012-07-05 23:47                     ` Sami Liedes
2012-07-06 10:42                       ` Jan Schmidt
2012-07-06 11:50                         ` Chris Mason
2012-07-06 14:33                         ` Sami Liedes
2012-07-06 14:40                           ` Chris Mason
2012-07-06 15:02                             ` Jan Schmidt
2012-07-06 15:19                               ` Chris Mason
2012-07-06 15:09                           ` Jan Schmidt
     [not found]                             ` <20120706195923.GA10687@sli.dy.fi>
2012-07-06 21:41                               ` Sami Liedes
2012-07-06 23:44                             ` Sami Liedes
2012-07-09  9:05                               ` *** GMX Spamverdacht *** " Arne Jansen
2012-07-10  4:16                                 ` Sami Liedes
2012-07-10  6:05                                   ` Arne Jansen
2012-07-10  6:57                                   ` *** GMX Spamverdacht *** " Arne Jansen
2012-07-16  8:20                                     ` Arne Jansen
2012-07-16 21:29                                       ` Sami Liedes
2012-07-28 12:08                                         ` Sami Liedes
2012-07-28 18:50                                           ` Sami Liedes
2012-07-03 13:14 ` Sami Liedes
2013-03-27 11:54 ` Stefan Behrens

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=4FF42876.8010309@jan-o-sch.net \
    --to=list.btrfs@jan-o-sch.net \
    --cc=linux-btrfs@vger.kernel.org \
    /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.