From: Vijayan Prabhakaran <pvijayan@gmail.com>
To: mason@suse.com, reiserfs-list@namesys.com
Cc: vijayan@cs.wisc.edu
Subject: Another bug in commiting old transactions
Date: Wed, 15 Sep 2004 16:34:17 -0500 [thread overview]
Message-ID: <d68fdf7d040915143410fe965f@mail.gmail.com> (raw)
Hi,
This is in continuation to my previous mail on bug in
reiserfs_journal_commit_thread().
Previous bug:
---------------
There is an "if" condition in reiserfs_journal_commit_thread():
if (CURRENT_TIME - last_run > 5) {
reiserfs_flush_old_commits(s);
}
that must be changed to
if (CURRENT_TIME - last_run >= 5) {
reiserfs_flush_old_commits(s);
}
New bug:
----------
Even after changing the above "if" condition to use ">=" instead of
">", dirty old data were not being flushed by the file system. The
reason for this in reiserfs_flush_old_commits() function.
There is a safety check in reiserfs_flush_old_commits(). It looks like:
/* safety check so we don't flush while we are replaying the log during
* mount
*/
if (list_empty(&SB_JOURNAL(p_s_sb)->j_journal_list)) {
return 0 ;
}
This condition was added so that the reiserfs doesn't flush dirty data
while replaying during mount.
But the first transaction after the mount does NOT get flushed to the
disk because of this condition. The first transaction gets added to
the j_journal_list only in function do_journal_end(). So, until that
point the j_journal_list remains empty.
Fix:
----
Actually, we don't need this condition at all.
reiserfs_flush_old_commits() function will be called only ONLY by the
reiserfs_journal_commit_thread. And this thread is created only after
the replay is over (in journal_init() function). So, I thought even
removing this condition would not affect the system in any way.
Chris: Any comments on this fix ? If you think it is ok, can you
please add this also to your patch ?
I appreciate your help.
Vijayan
reply other threads:[~2004-09-15 21:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=d68fdf7d040915143410fe965f@mail.gmail.com \
--to=pvijayan@gmail.com \
--cc=mason@suse.com \
--cc=reiserfs-list@namesys.com \
--cc=vijayan@cs.wisc.edu \
/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.