Whamcloud - gitweb
LU-13717 sec: limit hard links to linkEA size for enc files 87/43387/4
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 19 Oct 2020 14:23:05 +0000 (23:23 +0900)
committerOleg Drokin <green@whamcloud.com>
Wed, 2 Jun 2021 17:48:40 +0000 (17:48 +0000)
commit2ffb8f5726d27e7c2324a3e833491231fdaa3306
treee58422f3ab5a2434ca258ca289ec9af9d5f496cc
parent1158386ac9c6a638f791f62e47a7513b2322772c
LU-13717 sec: limit hard links to linkEA size for enc files

Some operations on encrypted files require to identify all names for
files having the same FID. For instance, for lookup, getattr or unlink
on encrypted files without the encryption key, we need to perform an
operation by FID instead of the actual name.
In order to make operations by FID unambiguous on server side, we
decide to limit the number of possible hard links for encrypted files,
to what the linkEA can contain.
Currently linkEA stores 4KiB of links, that is 14 NAME_MAX links, or
119 16-byte names.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I20a01874899f95b2ff61e05b2aa6851d135633e8
Reviewed-on: https://review.whamcloud.com/43387
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_linkea.h
lustre/lfsck/lfsck_namespace.c
lustre/mdd/mdd_dir.c
lustre/obdclass/linkea.c
lustre/tests/sanity-sec.sh