From: Vijayan Prabhakaran <pvijayan@gmail.com>
To: reiserfs-list@namesys.com
Subject: Bug in data journaling patch ?!
Date: Sat, 14 Aug 2004 12:45:08 -0500 [thread overview]
Message-ID: <d68fdf7d040814104533db0818@mail.gmail.com> (raw)
Hi,
I'm using Reiserfs on Linux 2.4.25 with the data journaling patch from
ftp://ftp.suse.com/pub/people/mason/patches/data-logging/2.4.25/.
I came across the following aberrant behavior and further
investigation led me to believe that there could be a bug in the data
journaling patch.
I ran a sequential-write workload that wrote 1 MB of data and finally
issued a fsync. I collected the block level trace and found that the
fsync() call returned _before_ flushing the journal data. This
happened in data journaling mode. The same behavior occured in ordered
journaling mode also. That is, the fsync call returned even before any
of the data was written.
I looked at the code and I guess this was caused by the data journaling patch.
Bug description:
----------------
In journal.c there is a function called do_journal_end(). There is
line in that function that initializes commit_trans_id. It looks like:
commit_trans_id = jl->j_trans_id;
The value of jl->j_trans_id was 0 (this could be due to some memset()).
Because commit_trans_id was 0, a later "if" condition failed. And, as
a result, the journal data didn't get flushed to disk. The "if"
condition looks like:
if (journal_list_still_alive(p_s_sb, commit_trans_id))
flush_commit_list(p_s_sb, jl, 1) ;
Bug fix:
--------
I changed the commit_trans_id initialization to the following and the
code worked fine.
commit_trans_id = SB_JOURNAL(p_s_sb)->j_trans_id ;
I'd greatly appreciate if someone can see if this really is a bug and
if the fix is appropriate.
Thanks,
Vijayan
next reply other threads:[~2004-08-14 17:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-14 17:45 Vijayan Prabhakaran [this message]
[not found] <d68fdf7d04081608477fc84e06@mail.gmail.com>
2004-08-16 16:07 ` Bug in data journaling patch ?! Chris Mason
2004-08-16 16:23 ` Vijayan Prabhakaran
2004-08-17 13:01 ` Chris Mason
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=d68fdf7d040814104533db0818@mail.gmail.com \
--to=pvijayan@gmail.com \
--cc=reiserfs-list@namesys.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 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.