f2fs-tools: use pread and pwrite when they are available.

This patch wants to reduce the number of system calls to improve performance.
pread and pwrite will only be used when the target platform support them.

Signed-off-by: LongPing Wei <weilongping@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Reviewed-by: Sheng Yong <shengyong@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2 files changed