Whamcloud - gitweb
LU-8320 llog: prevent llog ID re-use. 44/21144/4
authorMikhal Pershin <mike.pershin@intel.com>
Fri, 1 Jul 2016 17:07:02 +0000 (20:07 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 1 Aug 2016 02:10:02 +0000 (02:10 +0000)
commita93ede18ababa3fe1ae8f4a5f92e868589a58cb6
treece05bc9a2158df0371f4604fbd1f8431bbc274f6
parent9bb5a2fd3e76b460fd5121d48bc492be27a2e4f5
LU-8320 llog: prevent llog ID re-use.

The new llog ID generated in simple manner by
increment of the last used OID within the same FID
sequence. Therefore OID can cycle through zero and
match some very old llog file which is still in use
or orphaned. Patch skips such llog IDs. Also patch
replaces several assertions with sanity checks in
llog_write() path.

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: Iffd7e61f75fdb554ae03c8a4b685cd2aff648c24
Reviewed-on: http://review.whamcloud.com/21144
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/llog.c
lustre/obdclass/llog_osd.c