From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 14472] EXT4 corruption
Date: Thu, 29 Oct 2009 21:38:48 GMT [thread overview]
Message-ID: <200910292138.n9TLcmqC007601@demeter.kernel.org> (raw)
In-Reply-To: <bug-14472-13602@http.bugzilla.kernel.org/>
http://bugzilla.kernel.org/show_bug.cgi?id=14472
Parag Warudkar <parag.warudkar@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |parag.warudkar@gmail.com
--- Comment #2 from Parag Warudkar <parag.warudkar@gmail.com> 2009-10-29 21:38:47 ---
I looked at the fsck pics - I have gone through this a few days ago.
Aneesh suggested to apply the below patch and after applying it and crashing
the machine couple times I have not observed the corruption. So I have reason
to hope this patch below on top of today's git should improve things. Please
try.
commit a8836b1d6f92273e001012c7705ae8f4c3d5fb65
Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Date: Tue Oct 27 15:36:38 2009 +0530
ext4: discard preallocation during truncate
We need to make sure when we drop and reacquire the inode's
i_data_sem we discard the inode preallocation. Otherwise we
could have blocks marked as free in bitmap but still belonging
to prealloc space.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 5c5bc5d..a1ef1c3 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -209,6 +209,12 @@ static int try_to_extend_transaction(handle_t *handle,
struct inode *inode)
up_write(&EXT4_I(inode)->i_data_sem);
ret = ext4_journal_restart(handle, blocks_for_truncate(inode));
down_write(&EXT4_I(inode)->i_data_sem);
+ /*
+ * We have dropped i_data_sem. So somebody else could have done
+ * block allocation. So discard the prealloc space created as a
+ * part of block allocation
+ */
+ ext4_discard_preallocations(inode);
return ret;
}
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
next prev parent reply other threads:[~2009-10-29 21:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-26 16:52 [Bug 14472] New: EXT4 corruption bugzilla-daemon
2009-10-29 21:31 ` [Bug 14472] " bugzilla-daemon
2009-10-29 21:38 ` bugzilla-daemon [this message]
2009-10-29 21:44 ` bugzilla-daemon
2009-11-17 22:30 ` bugzilla-daemon
2009-11-17 22:31 ` bugzilla-daemon
2009-11-17 22:31 ` bugzilla-daemon
-- strict thread matches above, loose matches on Subject: below --
2009-10-26 18:45 2.6.32-rc5-git3: Reported regressions from 2.6.31 Rafael J. Wysocki
2009-10-26 18:55 ` [Bug #14472] EXT4 corruption Rafael J. Wysocki
2009-10-26 18:55 ` Rafael J. Wysocki
2009-10-29 19:57 ` Andrew Lutomirski
2009-10-29 19:57 ` Andrew Lutomirski
[not found] ` <cb0375e10910291257t1f2f16ciade932bd78689ccc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-29 21:33 ` Rafael J. Wysocki
2009-10-29 21:33 ` Rafael J. Wysocki
2009-10-29 22:23 ` Theodore Tso
2009-10-29 22:23 ` Theodore Tso
2009-10-29 22:34 ` Andrew Lutomirski
2009-10-29 22:43 ` Shawn Starr
[not found] ` <20091029222335.GJ18464-3s7WtUTddSA@public.gmane.org>
2009-10-29 22:34 ` Andrew Lutomirski
2009-11-03 23:43 ` Andrew Lutomirski
2009-11-03 23:43 ` Andrew Lutomirski
[not found] ` <cb0375e10911031543n5cfcc090k8780449a1413b067-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-05 19:31 ` Theodore Tso
2009-11-05 19:31 ` Theodore Tso
2009-11-16 22:33 2.6.32-rc7-git1: Reported regressions from 2.6.31 Rafael J. Wysocki
2009-11-16 22:37 ` [Bug #14472] EXT4 corruption Rafael J. Wysocki
2009-11-16 23:30 ` Andy Lutomirski
[not found] ` <9872C96C-FAE8-46E8-9588-25D917AF0EAD-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-11-17 22:32 ` Rafael J. Wysocki
2009-11-17 22:32 ` Rafael J. Wysocki
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=200910292138.n9TLcmqC007601@demeter.kernel.org \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-ext4@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.