From: Nikita Danilov <Nikita@Namesys.COM>
To: Micha Feigin <michf@post.tau.ac.il>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] reiserfs support for laptop_mode
Date: Mon, 19 Jan 2004 13:37:59 +0300 [thread overview]
Message-ID: <16395.45959.836058.398889@laputa.namesys.com> (raw)
In-Reply-To: <20040117061354.GB4768@luna.mooo.com>
Micha Feigin writes:
> I've been using this since 2.4.22 and since laptop_mode is in the
> kernel since 2.4.23-pre<something> and I haven't seen that anyone else
> has implemented this so I decided to post it on the list in case anyone
> is interested.
> It a patch to modify the journal flush time of reiserfs to support
> laptop_mode (same functionality as ext3 has already).
> The times are taken from bdflush.
Support for reiserfs laptop mode is in 2.6 now. It is done by adding new
mount option "commit=N" that sets commit interval in seconds.
It doesn't look right to just plainly set reiserfs commit interval to be
the same as the ext3 commit interval.
>
> --- kernel-source-2.4.25-pre6/fs/reiserfs/journal.c 2003-08-25 14:44:43.000000000 +0300
> +++ kernel-source-2.4.25-pre6.new/fs/reiserfs/journal.c 2003-10-20 03:35:58.000000000 +0200
> @@ -58,6 +58,7 @@
> #include <linux/stat.h>
> #include <linux/string.h>
> #include <linux/smp_lock.h>
> +#include <linux/fs.h>
>
> /* the number of mounted filesystems. This is used to decide when to
> ** start and kill the commit thread
> @@ -2659,8 +2660,12 @@
> /* starting with oldest, loop until we get to the start */
> i = (SB_JOURNAL_LIST_INDEX(p_s_sb) + 1) % JOURNAL_LIST_COUNT ;
> while(i != start) {
> - if (SB_JOURNAL_LIST(p_s_sb)[i].j_len > 0 && ((now - SB_JOURNAL_LIST(p_s_sb)[i].j_timestamp) > SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb) ||
> - immediate)) {
> + /* get_buffer_age() / HZ is used since the time returned by
> + * get_buffer_age is in sec * HZ and the journal time is taken in seconds.
> + */
> + if (SB_JOURNAL_LIST(p_s_sb)[i].j_len > 0 &&
> + ((now - SB_JOURNAL_LIST(p_s_sb)[i].j_timestamp) > get_buffer_age() / HZ
> + || immediate)) {
Nikita.
next prev parent reply other threads:[~2004-01-19 10:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-17 6:13 Micha Feigin
2004-01-19 10:37 ` Nikita Danilov [this message]
2004-01-21 18:28 ` Micha Feigin
2004-01-21 19:34 ` Bart Samwel
2004-01-22 9:50 ` Nikita Danilov
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=16395.45959.836058.398889@laputa.namesys.com \
--to=nikita@namesys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michf@post.tau.ac.il \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®