History log of /external/e2fsprogs/e2fsck/journal.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
63c2d4871fe374f13a0bc6e2efa341663277c123 12-Jun-2012 Theodore Ts'o <tytso@mit.edu> am 5886dc5c: am fada3660: e2fsck: correctly propagate error from journal to superblock

* commit '5886dc5cdcccd3d09a208d41d8c23748c25a2a22':
e2fsck: correctly propagate error from journal to superblock
f67550728914cb76896ef58d833dd68b4c6d5048 12-Jun-2012 Theodore Ts'o <tytso@mit.edu> am 0a02698f: am df5d2e2b: e2fsck: handle an already recovered journal with a non-zero s_error field

* commit '0a02698f2851f419aa75536afb5f040a5c9ce002':
e2fsck: handle an already recovered journal with a non-zero s_error field
b10cb70d3c40e5cefc80e9e5fd9c8f8dfb18b0d8 12-Jun-2012 Ken Sumrall <ksumrall@android.com> am 493c82bb: am 97bd1b76: Revert "Fix e2fsck to run a full check if only the journal has recorded an error"

* commit '493c82bb54397d2f46d2067bcedf966ea6da691f':
Revert "Fix e2fsck to run a full check if only the journal has recorded an error"
35db64508c8d95403a35dbbce52d3f6cd187626e 12-Jun-2012 Ken Sumrall <ksumrall@android.com> am 766baba9: am a8948fce: Revert "Better fix for marking fs err in superblock if err set in journal superblock."

* commit '766baba9d08c13ec364f20ad70ca36303f186038':
Revert "Better fix for marking fs err in superblock if err set in journal superblock."
fada366033e80c119867eb303e8b48a8e027a9be 11-Jun-2012 Theodore Ts'o <tytso@mit.edu> e2fsck: correctly propagate error from journal to superblock

If the file system is mounted read-only after a file system error has
been detected, the fact that an error occurred is written to the
journal. This is important because while the journal is getting
replayed, the error indication in the superblock may very well get
overwritten.

Unfortunately, the code to propagate the error indication from the
journal to superblock was broken because this was being done before
the old file system handle is thrown away and the file system is
re-opened to ensure that no stale data is in the file system handle.
As a result, the error indication in the superblock was never written
out.

To fix this, we need to move the check if the journal's error
indicator has been set after the file system has been freed and
re-open.

Reported-by: Ken Sumrall <ksumrall@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/e2fsck/journal.c
df5d2e2b942bb263972fe30a4baafd68056e02bd 01-Jun-2012 Theodore Ts'o <tytso@mit.edu> e2fsck: handle an already recovered journal with a non-zero s_error field

If a file system was remounted read-only after a file system
corruption is detected, and then that file system is mounted and
unmounted by the kernel, the journal would have been recovered, but
the kernel currently leaves the s_errno field still set. This is
arguably a bug, since it has already propgated the non-zero s_errno
field to the file system superblock, where it will be retained until
e2fsck has been run.

However, e2fsck should handle this case for existing kernel by
checking the journal superblock's s_errno field even if journal
recovery is not required.

Without this commit, e2fsck would not notice anything wrong with the
file system, but a subsequent mount of the file system by the kernel
would mark the file system's superblock as needing checking (since the
journal's s_errno field would still be set), resulting an full e2fsck
run at the next reboot, which would find nothing wrong --- and then
when the file system was mounted, the whole cycle would repeat again.

I had seen reports of this in the past, but it wasn't until recently
that I realized exactly how this had come about, since normally e2fsck
would be run automatically before the file system is mounted again,
thus avoiding this problem. However, a user using a rescue CD who
didn't run e2fsck before mounting the a file system in this condition
could trigger this situation, and unfortunately, with previous
versions of e2fsprogs and the kernel, there would be no way out no
matter what the user tried to do.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/e2fsck/journal.c
97bd1b76758fc5c78b000df9a8bc3840e4f1d31c 11-Jun-2012 Ken Sumrall <ksumrall@android.com> Revert "Fix e2fsck to run a full check if only the journal has recorded an error"

This reverts commit 8c157a2c73b27b3f3ae566be78279460a35ccbc1.
/external/e2fsprogs/e2fsck/journal.c
a8948fce2be374a697f38bcefc8c33271b83b432 11-Jun-2012 Ken Sumrall <ksumrall@android.com> Revert "Better fix for marking fs err in superblock if err set in journal superblock."

This reverts commit 46e96be157785a3582844efb27f4eef38943400b.
/external/e2fsprogs/e2fsck/journal.c
7ebd23d5cacb949311fb6f741cb4f5c8063dd8cf 07-Jun-2012 Ken Sumrall <ksumrall@android.com> am 1f0e651e: am 46e96be1: Better fix for marking fs err in superblock if err set in journal superblock.

* commit '1f0e651eb5b5d45bb68ef3902c40d9c32399bc9f':
Better fix for marking fs err in superblock if err set in journal superblock.
46e96be157785a3582844efb27f4eef38943400b 05-Jun-2012 Ken Sumrall <ksumrall@android.com> Better fix for marking fs err in superblock if err set in journal superblock.

The previous fix of flushing out the superblock after setting the
EXT2_ERROR_FS flag was erroneous because running the journal could have
updated the superblock (but not the in-memory copy the code referenced).
So instead, check the journal error conditions after running the journal
and freeing and re-opening the filesystem. Also, make sure to flush
the error state of the superblock to disk before clearing the error state
of the journal.

Change-Id: Ia5cde1a367d86992c9bd3bca652a1289935d1380
/external/e2fsprogs/e2fsck/journal.c
e6601194c14f2558457ba21b349cae690153c362 05-Jun-2012 Ken Sumrall <ksumrall@android.com> am 82ca75b8: am 8c157a2c: Fix e2fsck to run a full check if only the journal has recorded an error

* commit '82ca75b8ac7270a54aa5349a76e1df618023997d':
Fix e2fsck to run a full check if only the journal has recorded an error
8c157a2c73b27b3f3ae566be78279460a35ccbc1 05-Jun-2012 Ken Sumrall <ksumrall@android.com> Fix e2fsck to run a full check if only the journal has recorded an error

If only the journal superblock had recorded an error, but not the ext4
superblock, e2fsck would mark the superblock as containing an error.
However, it was never flushed to disk before e2fsck restarted itself
after recovering the journal, and the full check didn't happen.

Change-Id: I2952b50d3f27c6b72b6167903dbc5a26c188df0c
/external/e2fsprogs/e2fsck/journal.c
8558eab78390d1924cd6b255686ceef133f294d5 15-Dec-2011 Ken Sumrall <ksumrall@android.com> Update e2fsprogs to version 1.41.14

Change-Id: Ia1ae1df03ba5ae95f9437686285a6f5119c5aa9b
/external/e2fsprogs/e2fsck/journal.c
3984b61df41c68966bdfbb2a5e5a45ef4b9a536c 06-May-2010 Dmitry Shmidt <dimitrysh@google.com> e2fsprogs: Update to Version 1.44.11

Change-Id: Ie9b7d1fdfcc2374d292c75d6ea38d073f8d85ac6
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
/external/e2fsprogs/e2fsck/journal.c
19dacda2b02bb08c0ffb649f84526b249c749279 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/external/e2fsprogs/e2fsck/journal.c
46d0566257ac6602b2be479a5c36147c741170f6 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/external/e2fsprogs/e2fsck/journal.c
0a84e9cae698b8ea5c3389429126c25816986d81 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/external/e2fsprogs/e2fsck/journal.c