lkml.org 
[lkml]   [2003]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] laptop-mode for 2.6, version 2
On Thu, 25 Dec 2003 12:17:43 +0300
Nikita Danilov <Nikita@Namesys.COM> wrote:

> > unsigned long blocks;
> > unsigned long mount_options = REISERFS_SB(s)->s_mount_opt;
> > unsigned long safe_mask = 0;
> > + unsigned int commit_max_age = -1;
>
> Assigning -1 to the unsigned int looks strange. Let's use 0, it is
> invalid anyway.
Yes, must change to -1, fixed.

> I think that it would be better to first
>
> SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb) = val
>
> in the parse_options() (after checking for validity), and in
> journal_init() do something like
>
> if (SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb) == 0) {
> SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb) = le32_to_cpu (jh->jh_journal.jp_journal_max_commit_age);
> }
>
> This will also get rid of
>
> + if(commit_max_age != -1) {
> + SB_JOURNAL_MAX_COMMIT_AGE(s) = commit_max_age;
> + }
> +
>
> piece in reiserfs_remount.
>
> Otherwise patch looks ok. Have you tested it?
>
In the parse_options() can not assigning commit max age to super block,
the journal memory not malloc, so I pass a it to journal_init.

Yes, It works in my laptop for 1 days. Every thinks is fine.

Thanks.
--
Hu Gang / Steve
RLU# : 204016 [1999] (Registered Linux user)
GPG Public Key: http://soulinfo.com/~hugang/HuGang.asc
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.056 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site