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 series introduces some helper functions which help to skip hole blocks efficiently, and reduces the overhead with them. A measurement result of this series 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 Thanks, Ryusuke Konishi -- Ryusuke Konishi (4): nilfs2: unify type of key arguments in bmap interface nilfs2: add bmap function to seek a valid key nilfs2: add helper to find existent block on metadata file nilfs2: improve execution time of NILFS_IOCTL_GET_CPINFO ioctl fs/nilfs2/alloc.c | 5 +++-- fs/nilfs2/bmap.c | 48 ++++++++++++++++++++++++++++++--------- fs/nilfs2/bmap.h | 13 ++++++----- fs/nilfs2/btree.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nilfs2/cpfile.c | 58 ++++++++++++++++++++++++++++++++++++++++++----- fs/nilfs2/direct.c | 17 ++++++++++++++ fs/nilfs2/inode.c | 6 ++--- fs/nilfs2/mdt.c | 54 ++++++++++++++++++++++++++++++++++++++++++++ fs/nilfs2/mdt.h | 3 +++ 9 files changed, 243 insertions(+), 27 deletions(-) -- 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