Whamcloud - gitweb
LU-12577 llog: protect partial updates from readers 89/43589/8
authorAlex Zhuravlev <bzzz@whamcloud.com>
Sun, 9 May 2021 06:32:55 +0000 (09:32 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 21 Jun 2021 22:16:10 +0000 (22:16 +0000)
commitae1404feefc1572fdafed938a3fc18131d675678
tree551166374f8a245af9bc4a4a6a17807b55d9de7d
parent0c1ae1cb9c19f8a4f6c5a7ff6a1fd54807430795
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
Reviewed-on: https://review.whamcloud.com/43589
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_support.h
lustre/obdclass/llog_osd.c
lustre/tests/sanity.sh