Whamcloud - gitweb
LU-12577 llog: protect partial updates from readers 89/43589/7
authorAlex Zhuravlev <bzzz@whamcloud.com>
Sun, 9 May 2021 06:32:55 +0000 (09:32 +0300)
committerAlex Zhuravlev <bzzz@whamcloud.com>
Tue, 15 Jun 2021 14:48:17 +0000 (14:48 +0000)
commit03dd1bb036d426a692584d73f66bcdb221658d79
treeaff5eeed752bea243b8973dc509d40be865d2dad
parent2ce6957b69370b0ce75725d1d91866bf55c07fa8
LU-12577 llog: protect partial updates from readers

llog_osd_write_rec() adds a record in few steps: the header is
updated first, then the record itself is appended. per-loghandle
semaphore is used, but remote readers allocate a new separate
loghandle for every access (header reading, blocks), the the
readers can't use loghandle's semaphore to avoid accessing partial
updates. use object-based locking [censored] to serialize the writer
vs the readers.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie4e4d4a1e9a6fcdea9fcca7d80b0da920e786424
lustre/include/obd_support.h
lustre/obdclass/llog_osd.c
lustre/tests/sanity.sh