Whamcloud - gitweb
LU-13055 mdd: per-user changelog names and mask
authorMikhail Pershin <mpershin@whamcloud.com>
Tue, 22 Jun 2021 18:16:26 +0000 (21:16 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 19 Jul 2021 21:37:03 +0000 (21:37 +0000)
commitaa5da2d8074707b03e3b48340c5d51943be2f19e
tree903478f19767ef493f1991fd36aa6dbc7ffb49b7
parent2d5a859a14ce9c7721f56ec7f2ebb77bda9da27e
LU-13055 mdd: per-user changelog names and mask

Allow specifying a name for newly-registered changelog users,
rather than the default "clNNN" that is otherwise used. This
allows services to register a "well-known" changelog user,
rather than having to store the changelog username in HA storage
outside of the filesystem.

Each changelog user still has a unique ID appended to it, to allow
the changelog_clear and changelog_deregister commands to be run
using only the ID if necessary/desired. User name can be used to
deregister. User name is also unique per server.

If no name is given, then default "cl" format is used.

With this new functionality, it is possible to specify the name like:
 # lctl --device testfs-MDT0000 changelog_register --user watcher
   testfs-MDT0000: Registered changelog userid 'cl13-watcher'

Per-user mask is also added to allow specific operation logging on
per-user basis. Mask can be set only during registration. Resulting
mask from per-server mask and all user masks is used for current
changelog operations.

Lustre-change: https://review.whamcloud.com/43380
Lustre-commit: a15eb4f13224e148810015896101b2950c85adff

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I56028f54cc97bbc9af03fd6559c19ef854f759d8
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-on: https://review.whamcloud.com/44283
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
19 files changed:
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/mdd/mdd_device.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_lproc.c
lustre/mdd/mdd_object.c
lustre/mdd/mdd_trans.c
lustre/obdclass/llog_swab.c
lustre/obdclass/llog_test.c
lustre/ptlrpc/wiretest.c
lustre/tests/sanity.sh
lustre/tests/test-framework.sh
lustre/utils/lctl.c
lustre/utils/liblustreapi_chlg.c
lustre/utils/llog_reader.c
lustre/utils/obd.c
lustre/utils/wirecheck.c
lustre/utils/wirehdr.c
lustre/utils/wiretest.c