Whamcloud - gitweb
LU-15761 obdclass: fix locking in llog_cat_refresh()
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 2 May 2022 18:38:47 +0000 (21:38 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 6 May 2022 06:58:10 +0000 (06:58 +0000)
commitaf35024649d7d9da9c400eaffc2f4411557a5e28
tree1da2920cb3420912ab7d5d1cf62607b0ccea5ad1
parent8c800f3230f995df60654855c9d6f4b6d6cf526a
LU-15761 obdclass: fix locking in llog_cat_refresh()

the patch fixes two problems:
1) pairing up_write() should be used with cathandle
2) llog_read_header() manipulates loghandle's internal
   structures (header, last_idx, etc) which are supposed
   to stay consistent from another user's point of view
   (like llog_add_rec())

Lustre-change: https://review.whamcloud.com/47185
Lustre-commit: 69cdcbe3cf732124b3b5be1a1f235aa1b78f6c85

Fixes: 71f409c9b31b ("LU-11418 llog: refresh remote llog upon -ESTALE")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib86e10a925b541d02c22d74e6ddbc4368345ac11
Reviewed-on: https://review.whamcloud.com/47190
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/obdclass/llog_cat.c