Whamcloud - gitweb
LU-13308 mdd: add LLOG_F_EXT_X_NID_BE 99/50099/21
authorMr NeilBrown <neilb@suse.de>
Wed, 21 Aug 2024 13:51:39 +0000 (07:51 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 30 Aug 2024 05:59:15 +0000 (05:59 +0000)
commitad5d6d47dcfcdad720ec3e73cd5be2d5afe83cb1
tree2a281c8a467405828a62d74ceb5f801ada1134c4
parent16161cf2fcb0f4c94260a1bdee0c9b44f8b120a8
LU-13308 mdd: add LLOG_F_EXT_X_NID_BE

The log already has enough space for a large nid thanks to extra space
in string changelog_ext_nid, but there is no way to tell if the
provided nid is large.

Also the nid is stored host-endian meaning the log is nor portable
across architectures.  !!!  A large nid is always big-endian.

So add a flag to assert that the nid is bigendian and use it only for
large nids.

For 4-byte nids we continue to use host-endian and don't set the BE
flag.

LLOG_F_EXT_X_NID_BE indicates that the log implementation supports
large big-endian nids.

CLFE_NID_BE indicates that the NID in this record is big-endian and
large.

CHANGELOG_FLAG_NID_BE is sent by user land tools to tell the kernel
to present NIDs in a large big-endian format.

uc_nid in struct lu_ucred is now a large nid - struct lnet_nid

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: I6938090df4f30e916b79d1f58b34b518ab6bdcf7
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50099
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 files changed:
lustre/include/lustre/lustreapi.h
lustre/include/md_object.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/mdc/mdc_changelog.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_object.c
lustre/mdt/mdt_lib.c
lustre/obdclass/llog_osd.c
lustre/ptlrpc/wiretest.c
lustre/tests/lustre-rsync-test.sh [changed mode: 0644->0755]
lustre/utils/lfs.c
lustre/utils/liblustreapi_chlg.c
lustre/utils/llog_reader.c
lustre/utils/lustre_rsync.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c