Whamcloud - gitweb
LU-11418 llog: refresh remote llog upon -ESTALE 01/33401/4
authorLai Siyao <lai.siyao@intel.com>
Wed, 17 Oct 2018 05:29:53 +0000 (13:29 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 13 Nov 2018 06:18:27 +0000 (06:18 +0000)
commit71f409c9b31b90fa432f1f46ad4e612fb65c7fcc
tree3a4c2186e43759e2cb4855b6d4aac17abbe89f96
parent5f3b0966d4d42154e2d390292d4455fc70531e2d
LU-11418 llog: refresh remote llog upon -ESTALE

If a distributed transaction is aborted, it will invalidate all
objects involved, which include remote catalog and update logs.

So llog_cat_declare_add_rec() will refresh remote llog upon -ESTALE,
but it only does this for chd_current_log, not chd_next_log.

If an aborted transaction happens to invalidate catalog only, and
leave chd_current_log valid, which will cause subsequent operations
fail to create chd_next_log.

This patch prepares both current and next log of catalog before
declare_write in llog_cat_declare_add_rec().

Add sanity.sh 60g.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ie2d37686e910676587baefa1687ebb607be3c3a1
Reviewed-on: https://review.whamcloud.com/33401
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_log.h
lustre/obdclass/llog_cat.c
lustre/tests/sanity.sh