Whamcloud - gitweb
LU-7276 utils: fix llog_reader loop on empty log
If llog_reader tries to read an empty log file (0 bytes) it does not
detect this as an error, since it tries to read 0 bytes from the llog
and then tries to parse an empty llog header.
Return an error if the llog file is smaller than struct llog_log_hdr.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ife482eb6d73b35f09cc70ca4b79bfd7b053ebb35
Reviewed-on: http://review.whamcloud.com/17627
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>