From: "Jörn Engel" <joern@logfs.org>
To: srimugunthan dhandapani <srimugunthan.dhandapani@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: Re: logfs unmount bug
Date: Fri, 5 Aug 2011 18:03:25 +0200 [thread overview]
Message-ID: <20110805160325.GM26160@logfs.org> (raw)
In-Reply-To: <CAMjNe_d9WVnKS_4416Kj21YgVEh3d6W4Wa6qWZObex+=LG4J6w@mail.gmail.com>
On Fri, 5 August 2011 01:05:11 +0530, srimugunthan dhandapani wrote:
>
> With the latest kernel logfs unmount produces kernel BUG at
> fs/logfs/segment.c:858[2]. The problem is in the invalidatepage
> implementation of the device_mapping inode.
> It is assumed in the code that invalidatepage of the mapping_inode
> shouldnt be invoked. The present invalidatepage implementation just
> calls BUG(). I don't know why it is assumed like that.
Probably warrants a comment in the code. The PagePrivate pages are
supposed to be removed before calling generic_shutdown_super. Clearly
that isn't the case any more.
> But i modified the invalidatepage to clear the page private and update
> flag as shown in patch [1]. With that, i tested with nandsim and i am
> able to do a clean unmount. I am curious to know what is correct
> solution.
In principle that works. But it means that any private pages that
shouldn't be private will also be silently cleared. So effectively
your patch has removed an assertion that may still become useful. A
different patch can be found here:
http://git.kernel.org/?p=linux/kernel/git/joern/logfs.git;a=commitdiff;h=cc417cd06e2f496d64ac46041bd08287c677ad3d
The tree also contains two other patches that fix clear bugs in logfs.
Does that work for you?
> [1]
> Signed-off-by: srimugunthan <srimugunthan.dhandapani@gmail.com>
> ---
> fs/logfs/segment.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c
> index 9d51873..d83b778 100644
> --- a/fs/logfs/segment.c
> +++ b/fs/logfs/segment.c
> @@ -855,7 +855,10 @@ static struct logfs_area *alloc_area(struct
> super_block *sb)
>
> static void map_invalidatepage(struct page *page, unsigned long l)
> {
> - BUG();
> + ClearPagePrivate(page);
> + page->private = 0;
> +
> + ClearPageUptodate(page);
> }
>
> static int map_releasepage(struct page *page, gfp_t g)
Jörn
--
Those who come seeking peace without a treaty are plotting.
-- Sun Tzu
--
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
next prev parent reply other threads:[~2011-08-05 16:02 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 [this message]
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
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=20110805160325.GM26160@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).