Whamcloud - gitweb
LU-16405 osd: lookup cache
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 3 Apr 2023 10:32:59 +0000 (13:32 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 28 Aug 2023 16:17:02 +0000 (16:17 +0000)
commit568eba9def156803d2d1e6baab0b3a875e602629
tree705093f11260d3534096057e1d6f61aafb5ea0c5
parent1ea489f05b389609662845a746d4e4b07095eae4
LU-16405 osd: lookup cache

MDT may need to re-lookup just checked names (after locking).
introduce a trivial tiny per-thread cache in OSD in order to
make such a repeating lookup cheap.

the original issue is that ext4_add_entry() doesn't really
check for possible duplicate (that would be expensive as
a whole 4K block must be scanned).

important: the cache is reset upon request processing completion as
we don't update iversion on a disk (due to conflict with VBR).

Lustre-change: https://review.whamcloud.com/50521
Lustre-commit: 29f8eb2a67ba2806d91d93de1e82e05a63f76382

Fixes: 79acb9a9e7 ("LU-10235 mdt: mdt_create: check EEXIST without lock")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I40c3ee702f7895c3bda00b380f904cd587e0a1c4
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51809
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
config/lustre-build-ldiskfs.m4
lustre/include/obd_support.h
lustre/mdt/mdt_reint.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/tests/sanityn.sh