linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryusuke Konishi <konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
To: andrea.gelmini-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ryusuke Konishi
	<konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
Subject: Re: Problem setting CP interval
Date: Fri, 10 Jun 2011 01:20:00 +0900 (JST)	[thread overview]
Message-ID: <20110610.012000.93457188.ryusuke@osrg.net> (raw)
In-Reply-To: <20110610.004125.192724285.ryusuke-sG5X7nlA6pw@public.gmane.org>

On Fri, 10 Jun 2011 00:41:25 +0900 (JST), Ryusuke Konishi wrote:
> Hi Andrea,
> On Thu, 9 Jun 2011 16:11:24 +0200, Andrea Gelmini wrote:
> > 2011/6/8 Andrea Gelmini <andrea.gelmini-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> > 
> > Hi all,
> >    and thanks a lot for your time.
> > 
> > >   But it doesn't care... I can change 'Commit interval' in any way,
> > >   but when I mount it I see this:
> > > [ 2366.096819] segctord starting. Construction interval = 0 seconds,
> > > CP frequency < 30 seconds
> > > [ 2535.082421] segctord starting. Construction interval = 0 seconds,
> > > CP frequency < 30 seconds
> > 
> > I made a stupid script to replicate my problem.
> > Results are the same, using different kernel, and so on.
> > I also tried different version of nilfs-tools, picking via git
> > since commit that introduce nilfs-tune.
> > 
> > You have just to run it as root (give it a look, before):
> > root@dell:/home/gelma/dev/prg# bash test_nilf.sh
> > 0+0 records in
> > 0+0 records out
> > 0 bytes (0 B) copied, 3.506e-05 s, 0.0 kB/s
> > mkfs.nilfs2 (nilfs-utils 2.1.0-rc1)
> > Start writing file system initial data to the device
> >        Blocksize:4096  Device:/dev/loop0  Device Size:1073741824
> > File system initialization succeeded !!
> > [  623.103552] segctord starting. Construction interval = 5 seconds,
> > CP frequency < 30 seconds
> > nilfs-tune 2.1.0-rc1
> > [  624.212073] segctord starting. Construction interval = 0 seconds,
> > CP frequency < 30 seconds
> > 
> > Thanks a lot for your time,
> > Andrea
> 
> Thank you, I could easily reproduce this problem.
> I will fix it.

The following patch fixes your problem.  (this patch is primarily
intended for the latest kernel and may not apply to older kernels as
is).

I will send it upstream along with other bug-fixes.

Thanks,
Ryusuke Konishi

---
From: Ryusuke Konishi <konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>

nilfs2: fix problem in setting checkpoint interval

Checkpoint generation interval of nilfs goes wrong after user has
changed the interval parameter with nilfs-tune tool.

 segctord starting. Construction interval = 5 seconds,
 CP frequency < 30 seconds
 segctord starting. Construction interval = 0 seconds,
 CP frequency < 30 seconds

This turned out to be caused by a trivial bug in initialization code
of log writer.  This will fix it.

Reported-by: Andrea Gelmini <andrea.gelmini-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
---
 fs/nilfs2/segment.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 141646e..bb24ab6 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -2573,7 +2573,7 @@ static struct nilfs_sc_info *nilfs_segctor_new(struct super_block *sb,
 	sci->sc_watermark = NILFS_SC_DEFAULT_WATERMARK;
 
 	if (nilfs->ns_interval)
-		sci->sc_interval = nilfs->ns_interval;
+		sci->sc_interval = HZ * nilfs->ns_interval;
 	if (nilfs->ns_watermark)
 		sci->sc_watermark = nilfs->ns_watermark;
 	return sci;
-- 
1.7.3.5

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2011-06-09 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-08 16:53 Problem setting CP interval Andrea Gelmini
     [not found] ` <BANLkTim7Dp7-U1ee1hm7EWpw5We+pPBjAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-09 14:11   ` Andrea Gelmini
     [not found]     ` <BANLkTimA3C9rCnsEHuCVwpx1DcB-a0757A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-09 15:41       ` Ryusuke Konishi
     [not found]         ` <20110610.004125.192724285.ryusuke-sG5X7nlA6pw@public.gmane.org>
2011-06-09 16:20           ` Ryusuke Konishi [this message]

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=20110610.012000.93457188.ryusuke@osrg.net \
    --to=konishi.ryusuke-zyj7fxus5i5l9jvzuh4aog@public.gmane.org \
    --cc=andrea.gelmini-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).