Whamcloud - gitweb
LU-17865 osc: fiemap deadlock fix 63/55163/3
authorAlexander Zarochentsev <alexander.zarochentsev@hpe.com>
Mon, 20 May 2024 18:33:18 +0000 (18:33 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 29 May 2024 04:43:29 +0000 (04:43 +0000)
commit97e66947cbbc7a6247a756535b0138e0227ebb25
tree520b1b81a58fba48d9df9639188e8a1a308cd58d
parentcb3baaab5da6f5daf1a743a6866f486421c8b83b
LU-17865 osc: fiemap deadlock fix

A fiemap call may deadlock due to wrongly requesting an ldlm lock at
server while the same lock is cached and pinned at the client. Two PR
lock requests are compatible so the deadlock also needs a concurrent
write lock.

ll_fiemap_info_key is shared between osc_object_fiemap()
calls, once OBD_FL_SRVLOCK flag is set, it is reused for
all subsequent RPCs regardless of the local lock caching status.

HPE-bug-id: LUS-12353
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I6e76bc5e4549ed887b8f6177432acf90f9ec614d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55163
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/obd_support.h
lustre/osc/osc_object.c
lustre/tests/sanity.sh