Whamcloud - gitweb
LU-9839 clio: lov active ios accounting fix
authorAlexander Zarochentsev <alexander.zarochentsev@hpe.com>
Tue, 21 Nov 2023 14:46:44 +0000 (09:46 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 27 Apr 2024 22:30:49 +0000 (22:30 +0000)
commitcc500ced218dac3ec838752c2a1b0b4400ba1617
tree96bc3686c128e0b9d25ad2d34a9ae4c5ff6e3d07
parent6d1b2e54d0c8f08bf95816ad25b85461f2b4d4f3
LU-9839 clio: lov active ios accounting fix

ASSERT(atomic_read(&lov->lo_active_ios)==0) is triggered due to a
bug in active_ios accounting. For some cl_io_init(,CIT_MISC,,)
calls increment the lov_active_ios counter is not protected by the
layout lock. So the checks for active_ios != 0 are racy and not
preventing another thread from starting new cl_io and incrementing
the active_ios counter after any check but before the assertion.

The lov_active_ios counter increment should be done under the
same condition as taking the layout type lock.
The ci_type=CIT_MISC and ci_ignore_layout=1 should not be used
in ll_dom_finish_open() as the I/O doesn't come
"from the osc layer" and may race with a layout change.

Lustre-change: https://review.whamcloud.com/51638
Lustre-commit: 5bc1dd825b700677b002a43463a463c3ccb665ec

HPE-bug-id: LUS-11628
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I35fda85b968b847a87e73dd36bbb1648c744d62c
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54863
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/file.c
lustre/lov/lov_io.c