Whamcloud - gitweb
LU-7039 llog: update llog header and size 69/16969/35
authorDi Wang <di.wang@intel.com>
Mon, 26 Oct 2015 10:02:29 +0000 (03:02 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 26 Jan 2016 20:20:00 +0000 (20:20 +0000)
commite1745ed18d8e28f3cf3d72df3b7ef50d83f36601
treee0b9da60424aab941f75f30bcdfcfb29aa7a084c
parent607f6919ea67b101796630d4b55649a12ea0e859
LU-7039 llog: update llog header and size

Once update request fails due to eviction or other failures,
all of update request in the sending list should return fail,
because after the failure, the update log in the following
request will have wrong llog bitmap. So once this happens,it
will

1. invalidate all of requests in the sending list.
2. lod_sub will update the llog header from remote target.
3. Then Sending list can accept new request.

Also a few other fixes for llog corruption

1. Because the size in OSP cache is not safe, because no lock
protect it. So we will add lgh_write_offset in loghandle to
track the write offset for remote update llog, and revalidate
the offset during updating the llog header.

2. rollback the lgh_index and bitmap once add new records
fails.

Add replay-single.sh 118 to verify the case.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: I2d3a700d3363867ac60aeb6b7641eceb65dfe12a
Reviewed-on: http://review.whamcloud.com/16969
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
14 files changed:
lustre/include/lustre_log.h
lustre/include/obd_support.h
lustre/obdclass/llog.c
lustre/obdclass/llog_cat.c
lustre/obdclass/llog_osd.c
lustre/osp/osp_dev.c
lustre/osp/osp_internal.h
lustre/osp/osp_md_object.c
lustre/osp/osp_object.c
lustre/osp/osp_trans.c
lustre/target/out_handler.c
lustre/target/update_trans.c
lustre/tests/replay-single.sh
lustre/tests/sanity.sh