* Problem setting CP interval
@ 2011-06-08 16:53 Andrea Gelmini
[not found] ` <BANLkTim7Dp7-U1ee1hm7EWpw5We+pPBjAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Andrea Gelmini @ 2011-06-08 16:53 UTC (permalink / raw)
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA
Hi all,
and thanks a lot for your work on NILFS2. It's wonderful.
I'm using it for my /home, and it works good.
Today I tried to change checkpoint interval using nilfs-tune.ยน
So, nilfs-tune -l gives me:
nilfs-tune 2.1.0-rc1
Filesystem volume name: home
Filesystem UUID: b22b2da4-be32-4e0c-ba33-1adeff256e2f
Filesystem magic number: 0x3434
Filesystem revision #: 2.0
Filesystem features: (none)
Filesystem state: invalid or mounted
Filesystem OS type: Linux
Block size: 2048
Filesystem created: Mon Jun 6 19:55:33 2011
Last mount time: Wed Jun 8 18:40:20 2011
Last write time: Wed Jun 8 18:48:16 2011
Mount count: 20
Maximum mount count: 50
Reserve blocks uid: 0 (user root)
Reserve blocks gid: 0 (group root)
First inode: 11
Inode size: 128
DAT entry size: 32
Checkpoint size: 192
Segment usage size: 16
Number of segments: 35678
Device size: 149648572416
First data block: 2
# of blocks per segment: 2048
Reserved segments %: 1
Last checkpoint #: 50352
Last block address: 50374721
Last sequence #: 24583
Free blocks count: 22718464
Commit interval: 20
# of blks to create seg: 0
CRC seed: 0x8987044d
CRC check sum: 0xc50b9714
CRC check data size: 0x00000118
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
So, I have continuos checkpoint, like this:
lscp|tail
50244 2011-06-08 18:45:22 cp - 141 600277
50245 2011-06-08 18:45:22 cp - 41 600277
50246 2011-06-08 18:45:22 cp - 57 600277
50247 2011-06-08 18:45:23 cp - 5884 600277
50248 2011-06-08 18:45:23 cp - 7736 600277
50249 2011-06-08 18:45:23 cp - 747 600276
I've tried stock Ubuntu kernel, also, but it's always the same.
Thanks a lot for your time,
Andrea
---------------------
ยน I'm using latest git tree for nilfs tools and kernel.
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem setting CP interval
[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>
0 siblings, 1 reply; 4+ messages in thread
From: Andrea Gelmini @ 2011-06-09 14:11 UTC (permalink / raw)
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA; +Cc: konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg
[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]
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
[-- Attachment #2: test_nilf.sh --]
[-- Type: application/x-sh, Size: 501 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem setting CP interval
[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>
0 siblings, 1 reply; 4+ messages in thread
From: Ryusuke Konishi @ 2011-06-09 15:41 UTC (permalink / raw)
To: andrea.gelmini-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA,
konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg
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.
Ryusuke Konishi
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem setting CP interval
[not found] ` <20110610.004125.192724285.ryusuke-sG5X7nlA6pw@public.gmane.org>
@ 2011-06-09 16:20 ` Ryusuke Konishi
0 siblings, 0 replies; 4+ messages in thread
From: Ryusuke Konishi @ 2011-06-09 16:20 UTC (permalink / raw)
To: andrea.gelmini-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-nilfs-u79uwXL29TY76Z2rM5mHXA, Ryusuke Konishi
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-09 16:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).