Whamcloud - gitweb
LU-12577 llog: protect partial updates from readers 47/45847/2
authorAlex Zhuravlev <bzzz@whamcloud.com>
Sun, 9 May 2021 06:32:55 +0000 (09:32 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 20 Sep 2022 03:35:15 +0000 (03:35 +0000)
commit3cdb4724405b066e370ef1f104198643051c82d8
treedd3c3aee829bbf5359f3a11cb73322a184eb6bd0
parentbcbee25b076161e993cea3e9762b896cdf289a9d
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>
Reviewed-on: https://review.whamcloud.com/45847
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: John Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_support.h
lustre/obdclass/llog_osd.c
lustre/tests/sanity.sh