Whamcloud - gitweb
LU-16405 osd: lookup cache 21/50521/36
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 3 Apr 2023 10:32:59 +0000 (13:32 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 27 Jul 2023 07:17:54 +0000 (07:17 +0000)
commit29f8eb2a67ba2806d91d93de1e82e05a63f76382
treeead3f206e7804eba7745b38e473a8a4e986d1c7d
parent3ebc8e0528e34a11ffeff1e6be347de18b248069
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).

Fixes: 79acb9a9e7 ("LU-10235 mdt: mdt_create: check EEXIST without lock")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I40c3ee702f7895c3bda00b380f904cd587e0a1c4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50521
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@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