* [PATCH 1/1] LogFS: Kernel BUG at readwrite.c:1193
@ 2010-11-16 16:54 Prasad Joshi
2010-12-06 17:09 ` Florian Mickler
0 siblings, 1 reply; 2+ messages in thread
From: Prasad Joshi @ 2010-11-16 16:54 UTC (permalink / raw)
To: Linux Kernel, florian, Joern, logfs
This happens when __logfs_create() tries to write a new inode to the
disk which is full.
__logfs_create() associates the transaction pointer with inode. During
the logfs_write_inode() function call chain this transaction pointer
is moved from inode to page->private using function move_inode_to_page
(do_write_inode() -> inode_to_page() -> move_inode_to_page)
When the write inode fails, the transaction is aborted and iput is
called on the failed inode. During delete_inode the same transaction
pointer associated with the page is getting used. Thus causing kernel
BUG.
The patch checks for error in write_inode() and restores the
page->private to NULL.
Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
---
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
index 6127baf..ee99a9f 100644
--- a/fs/logfs/readwrite.c
+++ b/fs/logfs/readwrite.c
@@ -1994,6 +1994,9 @@ static int do_write_inode(struct inode *inode)
/* FIXME: transaction is part of logfs_block now. Is that enough? */
err = logfs_write_buf(master_inode, page, 0);
+ if (err)
+ move_page_to_inode(inode, page);
+
logfs_put_write_page(page);
return err;
}
---------- Forwarded message ----------
From: <bugzilla-daemon@bugzilla.kernel.org>
Date: Tue, Nov 16, 2010 at 3:20 PM
Subject: [Bug 20162] [LogFS][2.6.36.rc7+] Kernel BUG at readwrite.c:1193
To: prasadjoshi124@gmail.com
https://bugzilla.kernel.org/show_bug.cgi?id=20162
Florian Mickler <florian@mickler.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |florian@mickler.org
Resolution| |PATCH_ALREADY_AVAILABLE
--- Comment #2 from Florian Mickler <florian@mickler.org> 2010-11-16
15:20:46 ---
Can you submit that patch to lkml and cc the logfs maintainer and the logfs
list?
(Joern Engel <joern@logfs.org>, logfs@logfs.org, linux-kernel@vger.kernel.org)
See Documentation/SubmittingPatches
Patch: https://bugzilla.kernel.org/show_bug.cgi?id=20162#c1
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] LogFS: Kernel BUG at readwrite.c:1193
2010-11-16 16:54 [PATCH 1/1] LogFS: Kernel BUG at readwrite.c:1193 Prasad Joshi
@ 2010-12-06 17:09 ` Florian Mickler
0 siblings, 0 replies; 2+ messages in thread
From: Florian Mickler @ 2010-12-06 17:09 UTC (permalink / raw)
Cc: Prasad Joshi, Linux Kernel, Joern, logfs, Andrew Morton
Hi,
On Tue, 16 Nov 2010 16:54:17 +0000
Prasad Joshi <prasadjoshi124@gmail.com> wrote:
> This happens when __logfs_create() tries to write a new inode to the
> disk which is full.
>
> __logfs_create() associates the transaction pointer with inode. During
> the logfs_write_inode() function call chain this transaction pointer
> is moved from inode to page->private using function move_inode_to_page
> (do_write_inode() -> inode_to_page() -> move_inode_to_page)
>
> When the write inode fails, the transaction is aborted and iput is
> called on the failed inode. During delete_inode the same transaction
> pointer associated with the page is getting used. Thus causing kernel
> BUG.
>
> The patch checks for error in write_inode() and restores the
> page->private to NULL.
>
>
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=20162 . Can
someone please review? Any comments?
> Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
> ---
> diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
> index 6127baf..ee99a9f 100644
> --- a/fs/logfs/readwrite.c
> +++ b/fs/logfs/readwrite.c
> @@ -1994,6 +1994,9 @@ static int do_write_inode(struct inode *inode)
>
> /* FIXME: transaction is part of logfs_block now. Is that enough? */
> err = logfs_write_buf(master_inode, page, 0);
> + if (err)
> + move_page_to_inode(inode, page);
> +
> logfs_put_write_page(page);
> return err;
> }
>
>
>
> ---------- Forwarded message ----------
> From: <bugzilla-daemon@bugzilla.kernel.org>
> Date: Tue, Nov 16, 2010 at 3:20 PM
> Subject: [Bug 20162] [LogFS][2.6.36.rc7+] Kernel BUG at readwrite.c:1193
> To: prasadjoshi124@gmail.com
>
>
> https://bugzilla.kernel.org/show_bug.cgi?id=20162
>
>
> Florian Mickler <florian@mickler.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|NEW |RESOLVED
> CC| |florian@mickler.org
> Resolution| |PATCH_ALREADY_AVAILABLE
>
>
>
>
> --- Comment #2 from Florian Mickler <florian@mickler.org> 2010-11-16
> 15:20:46 ---
> Can you submit that patch to lkml and cc the logfs maintainer and the logfs
> list?
> (Joern Engel <joern@logfs.org>, logfs@logfs.org, linux-kernel@vger.kernel.org)
>
> See Documentation/SubmittingPatches
>
> Patch: https://bugzilla.kernel.org/show_bug.cgi?id=20162#c1
>
> --
> Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-06 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-16 16:54 [PATCH 1/1] LogFS: Kernel BUG at readwrite.c:1193 Prasad Joshi
2010-12-06 17:09 ` Florian Mickler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome