Re: Problem setting CP interval
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@xxxxxxxxx>:
> >
> > 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@xxxxxxxxxxxxx>
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@xxxxxxxxx>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Filesystem; Devel]
[Linux CIFS]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]