In the first implementations of Posix copytool, file archive/restore
was using a loop around select() with handling/retry on EAGAIN.
This was later found as useless for regular files and fixed/changed
in patch for LU-3971 (http://review.whamcloud.com/7583, commit
397ebc93cef378e6d77450cdd095e2737b94f2f6).
But the O_NONBLOCK flag usage, during open() of file on archive, has
been kept since and must be removed, even if ineffective, to improve
code clarity.
Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ie6350e6f3951545f50783c9fff6753793b7a9a33
Reviewed-on: http://review.whamcloud.com/13672
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
goto fini_major;
}
- open_flags = O_WRONLY | O_NOFOLLOW | O_NONBLOCK;
+ open_flags = O_WRONLY | O_NOFOLLOW;
/* If extent is specified, don't truncate an old archived copy */
open_flags |= ((hai->hai_extent.length == -1) ? O_TRUNC : 0) | O_CREAT;
goto fini;
}
- src_fd = open(src, O_RDONLY | O_NOATIME | O_NONBLOCK | O_NOFOLLOW);
+ src_fd = open(src, O_RDONLY | O_NOATIME | O_NOFOLLOW);
if (src_fd < 0) {
rc = -errno;
CT_ERROR(rc, "cannot open '%s' for read", src);