Whamcloud - gitweb
LU-17848 osd: deduplicate OSD locking 48/55148/11
authorTimothy Day <timday@amazon.com>
Sat, 18 May 2024 17:41:09 +0000 (17:41 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 22 Jan 2025 19:30:38 +0000 (19:30 +0000)
commit7dce71b0daf786dd212457250a27283dc61b7222
tree7a93b35c8ef7ebebc148329c22792c148b0549fa
parent679fd7353b2ad6d5042b919f22e96f40180f19d6
LU-17848 osd: deduplicate OSD locking

The two OSDs currently handle locking identically using a rw
semaphore. Future OSDs will likely handle locking in the same
way, considering the need for sleeping; it doesn't make sense to
use internal filesystem locking to handle osd_object lifetimes.
Plus, these locks are only used by upper layers of Lustre - never
internally in the OSD.

Create generic dt semaphore and wrap locking into generic dt_*
functions.

Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I14df606ee99b94b9b2a610928e8ae5b9b2d8c718
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55148
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
lustre/include/dt_object.h
lustre/obdclass/dt_object.c
lustre/ofd/ofd_internal.h
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_object.c