Whamcloud - gitweb
LU-2843 llog: restore the size of llog for -ENOSPC
authorHongchao Zhang <hongchao.zhang@intel.com>
Fri, 29 Mar 2013 10:36:55 +0000 (18:36 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 3 Apr 2013 16:27:31 +0000 (12:27 -0400)
commit2fdc87cb05e0b1841938b4cf39ef07a26c386b2b
treefb5538854cb751acc2f7bb9322606a2bc6316185
parent6a95f4546b50d63b9cf7e97c931f694bc25a9704
LU-2843 llog: restore the size of llog for -ENOSPC

the llog is NOT aware its valid size, and if there is some invalid
space in the tail of the llog file, which could be caused if the
free space in the last block(512 bytes) of the llog file can't hold
the next record but it failed to get an extra block for -ENOSPC,
then it will mistake the data written partially for normal llog data!

Change-Id: Ie2619843b538cbb64ae21f9f2a12ff85a5a3e8b4
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/5604
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/llog_osd.c