full function
prepare to add threads
Merge branch 'state_dev' of https://github.com/fooling/shit_uestc_zfsystem into state_dev