From: Nikita Danilov <Nikita@Namesys.COM>
To: Hugang <hugang@soulinfo.com>
Cc: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>
Subject: Re: [PATCH] laptop-mode for 2.6, version 2
Date: Thu, 25 Dec 2003 13:27:30 +0300 [thread overview]
Message-ID: <16362.48018.56337.690901@laputa.namesys.com> (raw)
In-Reply-To: <20031225174033.1abb5401.hugang@soulinfo.com>
Hugang writes:
> 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.
+ if ( val > 0 ) {
+ *commit_max_age = val;
+ }
here warning should be issued, and mount refused, if val == 0.
>
> Thanks.
Nikita.
next prev parent reply other threads:[~2003-12-25 10:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-24 5:33 Bart Samwel
2003-12-24 11:16 ` Jens Axboe
2003-12-24 15:25 ` [PATCH] laptop-mode for 2.6, version 3 Bart Samwel
2003-12-25 10:06 ` Arnaldo Carvalho de Melo
2003-12-25 15:12 ` [PATCH] laptop-mode for 2.6, version 4 + smart_spindown Bart Samwel
2003-12-25 17:04 ` John Bradford
2003-12-25 21:39 ` Bart Samwel
2003-12-27 10:57 ` A couple of questions about laptop-mode for 2.6, version 4 Kiko Piris
2003-12-24 13:51 ` [PATCH] laptop-mode for 2.6, version 2 Hugang
2003-12-24 14:24 ` Nikita Danilov
2003-12-25 2:59 ` Hugang
[not found] ` <16362.43831.569086.825899@laputa.namesys.com>
2003-12-25 9:40 ` Hugang
2003-12-25 10:27 ` Nikita Danilov [this message]
2003-12-25 10:59 ` Hugang
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=16362.48018.56337.690901@laputa.namesys.com \
--to=nikita@namesys.com \
--cc=Linux-Kernel@Vger.Kernel.ORG \
--cc=hugang@soulinfo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome