Ryusuke Konishi 53a2c3bdf4 nilfs2: improve execution time of NILFS_IOCTL_GET_CPINFO ioctl
The older a filesystem gets, the slower lscp command becomes.  This is
because nilfs_cpfile_do_get_cpinfo() function meets more hole blocks
as the start offset of valid checkpoint numbers gets bigger.

This reduces the overhead by skipping hole blocks efficiently with
nilfs_mdt_find_block() helper.

A measurement result of this patch is as follows:

Before:
$ time lscp
                 CNO        DATE     TIME  MODE  FLG      BLKCNT       ICNT
             5769303  2015-02-22 19:31:33   cp    -          108          1
             5769304  2015-02-22 19:38:54   cp    -          108          1

real    0m0.182s
user    0m0.003s
sys     0m0.180s

After:
$ time lscp
                 CNO        DATE     TIME  MODE  FLG      BLKCNT       ICNT
             5769303  2015-02-22 19:31:33   cp    -          108          1
             5769304  2015-02-22 19:38:54   cp    -          108          1

real    0m0.003s
user    0m0.001s
sys     0m0.002s

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17 09:04:04 -04:00
..
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:37 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-03-18 10:29:48 +01:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2015-04-11 22:29:40 -04:00
2014-11-19 13:01:20 -05:00
2015-04-11 22:29:39 -04:00
2015-03-25 20:28:11 -04:00
2015-04-11 22:29:43 -04:00
2015-04-11 22:29:40 -04:00
2014-08-26 09:35:56 +02:00
2014-11-19 13:01:26 -05:00