Whamcloud - gitweb
LU-12577 llog: protect partial updates from readers
authorAlex Zhuravlev <bzzz@whamcloud.com>
Sun, 9 May 2021 06:32:55 +0000 (09:32 +0300)
committerOleg Drokin <green@linuxhacker.ru>
Wed, 14 Sep 2022 02:53:07 +0000 (22:53 -0400)
commitfa4c58fd651b969b4e7dddf735afa91e50b0ab9f
tree9aa13cb11c14c643c448ee9d72a9cf819f377bae
parentc20345a7d082c6ed0c08af1457d814bee3106e5b
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.

Lustre-change: https://review.whamcloud.com/43589
Lustre-commit: ae1404feefc1572fdafed938a3fc18131d675678

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie4e4d4a1e9a6fcdea9fcca7d80b0da920e786424
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
lustre/include/obd_support.h
lustre/obdclass/llog_osd.c
lustre/tests/sanity.sh