nilfs2: optimize rec_len functions