Whamcloud - gitweb
LU-11621 utils: optimize lhsmtool_posix with copy_file_range() 51/38651/5
authorJames Simmons <jsimmons@infradead.org>
Tue, 19 May 2020 18:59:40 +0000 (14:59 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 May 2020 05:05:39 +0000 (05:05 +0000)
commitccac422cf9dd3b2390d1c70cd42eff06d2f53be3
treec74978cef59d5d84b18f68a0c4bed143d9ce1f29
parentc6249b88a2adf2b4f0d661c4286812e9eae0c18a
LU-11621 utils: optimize lhsmtool_posix with copy_file_range()

Newer kernels and glibc offer copy_file_range() which avoids
a context switch needed with read() + write() for file data
copying. In the future Lustre can look to optimize this copy
on the server backend. Update lhsmtool_posix to use this new
functionality.

Change-Id: If63d57b89902f3d5c9ddde66901f3f55d15080f5
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/38651
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/autoconf/lustre-core.m4
lustre/include/lustre/lustreapi.h
lustre/utils/lhsmtool_posix.c
lustre/utils/liblustreapi.c
lustre/utils/lstddef.h