linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@logfs.org>
To: srimugunthan dhandapani <srimugunthan.dhandapani@gmail.com>
Cc: linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org
Subject: Re: logfs unmount bug
Date: Tue, 9 Aug 2011 16:58:12 +0200	[thread overview]
Message-ID: <20110809145812.GR26160@logfs.org> (raw)
In-Reply-To: <CAMjNe_c3J6UNi5LGmraD+CcbP9yGOOzepy=JFVy3wYx15hs55w@mail.gmail.com>

On Mon, 8 August 2011 20:14:15 +0530, srimugunthan dhandapani wrote:
> 
> > Not good.  So far I managed to see a (the?) tiobench bug once, but
> > couldn't make it reproduceable.  Nor could I reproduce the bonnie bug.
> > Once the bugs are reproduceable, even my feeble eyes can usually spot
> > the cause sooner or later.  With a backtrace alone and no idea what
> > internal state it depends on, life is much harder.
> >
> 
> I am sorry , i dont know what i am missing. I tried it 5 times. 4/5
> trials, the bonnie test didnt complete. .Even when it completed once,
> the logs show kernel bug.

Ok, since I cannot reproduce this at all, can you try the patch below?
While it may already fix the problem, I am more interested in the
output.

>  do_invalidatepage+0x28/0x30
>  truncate_inode_page+0x92/0xb0
>  truncate_inode_pages_range+0x177/0x4f0
>  truncate_inode_pages+0x15/0x20
>  truncate_pagecache+0x4f/0x70
>  truncate_setsize+0x1f/0x30
>  vmtruncate+0x3e/0x60
>  logfs_truncate+0x263/0x2a0 [logfs]
>  logfs_evict_inode+0xdc/0x190 [logfs]
>  ? do_raw_spin_unlock+0x5e/0xb0
>  evict+0xa9/0x1a0
>  iput+0xfd/0x200

Jörn

-- 
A quarrel is quickly settled when deserted by one party; there is
no battle unless there be two.
-- Seneca


diff --git a/fs/logfs/file.c b/fs/logfs/file.c
index f2c08bc..7afd9a7 100644
--- a/fs/logfs/file.c
+++ b/fs/logfs/file.c
@@ -168,8 +168,14 @@ static void logfs_invalidatepage(struct page *page, unsigned long offset)
 		struct logfs_super *super = logfs_super(sb);
 
 		super->s_dirty_bytes -= block->reserved_bytes;
-		block->ops->free_block(sb, block);
-		BUG_ON(bitmap_weight(block->alias_map, LOGFS_BLOCK_FACTOR));
+		if (bitmap_weight(block->alias_map, LOGFS_BLOCK_FACTOR)) {
+			printk(KERN_DEBUG"logfs_invalidatepage(%lx, %x, %llx)\n",
+					page->mapping->host->i_ino,
+					page->mapping->host->i_nlink,
+					page->mapping->host->i_size);
+			move_page_to_btree(page);
+		} else
+			block->ops->free_block(sb, block);
 	} else
 		move_page_to_btree(page);
 	BUG_ON(PagePrivate(page) || page->private);
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-08-09 14:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 19:35 logfs unmount bug srimugunthan dhandapani
2011-08-05 16:03 ` Jörn Engel
2011-08-06 14:09   ` srimugunthan dhandapani
2011-08-08  8:31     ` Jörn Engel
2011-08-08 14:44       ` srimugunthan dhandapani
2011-08-09 14:58         ` Jörn Engel [this message]
2011-08-10 11:06           ` srimugunthan dhandapani
2011-08-12  9:34             ` Jörn Engel
2011-08-12 17:26               ` srimugunthan dhandapani
2011-08-16 17:17                 ` Jörn Engel
2011-08-21 21:19                   ` srimugunthan dhandapani
2011-08-26 19:49                     ` Jörn Engel
2011-08-29 10:07                       ` srimugunthan dhandapani
2011-08-31  5:58                         ` Jörn Engel
2011-08-31  7:22                           ` srimugunthan dhandapani
2011-08-31  7:49                             ` Jörn Engel
2011-08-31 12:49                               ` srimugunthan dhandapani
2011-08-31 14:17                                 ` Jörn Engel
2011-09-01  6:08                                   ` srimugunthan dhandapani
2011-09-01  9:46                                     ` srimugunthan dhandapani
2011-09-01 21:34                                     ` Jörn Engel

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=20110809145812.GR26160@logfs.org \
    --to=joern@logfs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=srimugunthan.dhandapani@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).