Whamcloud - gitweb
LU-6389 utils: fix lustre_rsync read retry 75/18275/2
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 3 Feb 2016 02:48:35 +0000 (19:48 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 20 Feb 2016 05:40:10 +0000 (05:40 +0000)
commit7d165f5fe357010c3b41abf1163aacb09a88816f
treec977fb9b7de0957382357444f6eccee689ba45ed
parentbd1e41672c974b97148b65115185a57ca4b7bbde
LU-6389 utils: fix lustre_rsync read retry

The read() syscall could return less than the amount of data
requested.  Retry the read call until all data is read or an
error is returned.

Even though Lustre will retry the short read internally, the
code may as well be written correctly.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I712969c4f920b53fa6dc27ddcb968cb82df88a44
Reviewed-on: http://review.whamcloud.com/18275
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/utils/lustre_rsync.c