Linux NILFS development
 help / color / mirror / Atom feed
From: Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org>
To: roman-ohbefDXYbNo@public.gmane.org
Cc: users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org
Subject: Re: Constant checkpointing and cleanerd activity - doesn't play nice with mount --bind ?
Date: Mon, 23 Mar 2009 02:53:19 +0900 (JST)	[thread overview]
Message-ID: <20090323.025319.46709946.ryusuke@osrg.net> (raw)
In-Reply-To: <20090317191924.1924576b-2Ve/5xEMxL0@public.gmane.org>

On Tue, 17 Mar 2009 19:19:24 +0500, Roman Mamedov <roman-ohbefDXYbNo@public.gmane.org> wrote:
> On Tue, 17 Mar 2009 22:43:24 +0900 (JST)
> Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org> wrote:
> 
> > The garbage collection of nilfs is ``copying GC'', and it creates
> > checkpoints (it's normal for nilfs).  In addition, if segments
> > selected for cleaning have few reclaimable blocks, most remaining
> > blocks are copied into new segments.
> 
> I thought the NBLKINC count should not increase much when there are
> no user writes to the filesystem. But it was increasing by several
> thousands on every step.

Uum, sound logical.  But the interpretation will fairly change the
semantics and require some clarification about what the increment is
supposed to be:

- blocks duplicated for copy-on-write
   --> should be treated as increments (maybe)
- Segment headers and super root block.
   --> treated as increment at present (should be removed for the
       above standpoint)
- Some nilfs meta data files like sufile, cpfile, and the DAT file.
   --> treated as increment at present.
       These files even do not have past versions. So, they slightly
       differ from regular files in that sense.

Fortunately, this value does not affect FS-internal operation nor
cleanerd.  Only lscp uses the field.  So, it could be changed if no
one disputes it.
 
> This filesystem has size of about 300 gigabytes, and all I did, is
> copied about 150 gigabytes of data to it, with no deletions, no
> modifications or rewrites. But even about 6-8 hours after that, the
> cleanerd process still has work to do, so much, that it interferes with
> normal usage of the filesystem (i.e. playing a FLAC audio file from it
> was skipping at times, even counting a bit increased load from going
> through kcryptd, this shouldn't happen).

Sorry.  The current cleanerd is far from intelligent as you pointed
out, and I feel the same about that.  One of my colleagues is recently
trying to improve the cleanerd behavior.

> > Did you specify an fstype option?
> 
> I had the fstype specified as "none" (in fstab).
> 
> >   /nilfs2 on /test type none (rw,bind)
> 
> Yes, this is what I have.
> 
> > and, the second cleanerd has gone:
> 
> I have only one cleanderd in process list.
> 
> What is really strange, is that it looks like I can unmount the main
> NILFS, but the bind mount will continue to be accessible and writable.

This is the same as other Linux file systems.

> And when I remount the main mount point back, cleanerd grabs the bind
> mount. See below:
> 
> # mount -t nilfs2 /dev/mapper/hi320data /mnt/hi320data
> mount.nilfs2: WARNING! - The NILFS on-disk format may change at any
> time.
> mount.nilfs2: WARNING! - Do not place critical data on a NILFS
> filesystem.
<snip>
> # umount /mnt/bind-test 
> umount: /mnt/bind-test: device is busy
> umount: /mnt/bind-test: device is busy
> 
> # fuser -c /mnt/bind-test/
> /mnt/bind-test/:     23203
> 
> # ps -Af | grep 23203
> root 23203  1  1 19:06 ? 00:00:00 /sbin/nilfs_cleanerd
>    -n /dev/mapper/hi320data /mnt/hi320data
> 
> -----------------------
> Maybe it misdetects the bind mount as another mount of the same
> filesystem (e.g. like when mounting a snapshot)?

Thanks!  I could finally reproduce the problem.

Nilfs snapshots are readonly, but bind mounts could make multiple
r/w-mounts.  And, cleanerd prevents umount in such cases.  I have to
take bind mounts into account, as was expected, in the mount/umount
helper programs.  I'd like to fix this by the next release.

Regards,
Ryusuke Konishi

  parent reply	other threads:[~2009-03-22 17:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17 10:45 Constant checkpointing and cleanerd activity - doesn't play nice with mount --bind ? Roman Mamedov
     [not found] ` <20090317154529.1aeeecdc-2Ve/5xEMxL0@public.gmane.org>
2009-03-17 13:43   ` Ryusuke Konishi
     [not found]     ` <20090317.224324.58871500.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-03-17 14:19       ` Roman Mamedov
     [not found]         ` <20090317191924.1924576b-2Ve/5xEMxL0@public.gmane.org>
2009-03-22 17:53           ` Ryusuke Konishi [this message]
2009-03-31 14:44           ` Ryusuke Konishi
     [not found]             ` <20090331.234437.112904649.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-03-31 15:10               ` Ryusuke Konishi
     [not found]                 ` <20090401.001059.06956465.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-03-31 15:14                   ` Alex Bitney
     [not found]                     ` <591bc86b0903310814t2814ab95ie71077d5bb59f99d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-31 16:09                       ` Ryusuke Konishi

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=20090323.025319.46709946.ryusuke@osrg.net \
    --to=ryusuke-sg5x7nla6pw@public.gmane.org \
    --cc=roman-ohbefDXYbNo@public.gmane.org \
    --cc=users-JrjvKiOkagjYtjvyW6yDsg@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