Whamcloud - gitweb
LU-8569 linkea: linkEA size limitation 00/23500/9
authorFan Yong <fan.yong@intel.com>
Sun, 28 Aug 2016 10:15:37 +0000 (18:15 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 1 Jan 2017 01:57:34 +0000 (01:57 +0000)
commite760042016bb5b12f9b21568304c02711930720f
tree826d4cd4deb710c6a56452cccdf83417773b0de4
parent6830dc1378e7f7e9f3aed5dff404ee4b7e0d0a81
LU-8569 linkea: linkEA size limitation

Under DNE mode, if we do not restrict the linkEA size, and if there
are too many cross-MDTs hard links to the same object, then it will
casue the llog overflow. On the other hand, too many linkEA entries
in the linkEA will serious affect the linkEA performance because we
only support to locate linkEA entry consecutively.

So we need to restrict the linkEA size. Currently, it is 4096 bytes,
that is independent from the backend. If too many hard links caused
the linkEA overflowed, we will add overflow timestamp in the linkEA
header. Such overflow timestamp has some functionalities:

1. It will prevent the object being migrated to other MDT, because
   some name entries may be not in the linkEA, so we cannot update
   these name entries for the migration.

2. It will tell the namespace LFSCK that the 'nlink' attribute may
   be more trustable than the linkEA, then avoid misguiding the
   namespace LFSCK to repair 'nlink' attribute based on linkEA.

There will be subsequent patch(es) for namespace LFSCK to handle the
linkEA size limitation and overflow cases.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2d6c2be04305c1d7e3af160d8b80e73b66a36483
Reviewed-on: https://review.whamcloud.com/23500
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
18 files changed:
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_linkea.h
lustre/include/obd_support.h
lustre/lfsck/lfsck_namespace.c
lustre/llite/llite_lib.c
lustre/lod/lod_object.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_internal.h
lustre/mdt/mdt_handler.c
lustre/obdclass/linkea.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_xattr.c
lustre/osp/osp_object.c
lustre/ptlrpc/wiretest.c
lustre/target/out_lib.c
lustre/tests/sanity-lfsck.sh
lustre/utils/wirecheck.c
lustre/utils/wiretest.c