]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_io: Improvements to copy_range return code handling
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 12 Jan 2017 20:12:40 +0000 (14:12 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 12 Jan 2017 20:12:40 +0000 (14:12 -0600)
commit43141802cdade027663044952f8d09f71d59faa4
tree09c3510c332e8cb83e407a4330f370dafa3eb823
parent0cf66b0ff6f859d5a24e65f282dc92548164dfef
xfs_io: Improvements to copy_range return code handling

If copy_file_range() returns 0, then that means no data was copied.  We
should break out of the loop in this case to prevent looping
indefinitely.

Additionally, if an error is returned by copy_file_range() then we need
to print out the string form to be used by error checking tests in
xfstests.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/copy_file_range.c