Whamcloud - gitweb
LU-12577 llog: protect partial updates from readers
authorAlex Zhuravlev <bzzz@whamcloud.com>
Tue, 15 Jun 2021 14:47:39 +0000 (17:47 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 16 Sep 2021 21:01:26 +0000 (21:01 +0000)
commit9ba8a72a8e7ae0859c7700ff52021f83337406b3
tree21bc651965b99994c1f6d3b2d50ce917547b7a69
parent54beb93ee9b52ea331eba911a3436a50d618debe
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: 03dd1bb036d426a692584d73f66bcdb221658d79

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie4e4d4a1e9a6fcdea9fcca7d80b0da920e786424
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44935
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd_support.h
lustre/obdclass/llog_osd.c
lustre/tests/sanity.sh