Whamcloud - gitweb
LU-6388 utils: make llog_reader parse changelogs 20/14120/18
authorOlaf Faaland <faaland1@llnl.gov>
Fri, 6 Mar 2015 23:38:00 +0000 (07:38 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 15 Sep 2015 16:56:21 +0000 (16:56 +0000)
commitbd61b6f1bb9848167d0cdecb22099856c3ad98ca
treee03d65b536a1e3cad5c9264a567a50bd0f13b7cb
parent6bf1d78ed87dc25cef0e8a48f1ef251f9bb017a8
LU-6388 utils: make llog_reader parse changelogs

Improve support for changelog_catalog records and changelog records.

Extend llog_reader to handle records of type CHANGELOG_REC or
CHANGELOG_USER_REC (present in lustre logs with changelog entries).

Records in the changelog_catalog (type LLOG_LOGID_MAGIC) contain the
ID of the object (file) containing actual changelog records.  The new
output provides the pathname to those files, as one would see them
when mounting an ldiskfs or zfs target via the posix layer. This makes
it easy to find those files to inspect them.

Move some logid/fid manipulation functions, which are specific to
llogs, out of lustre_log.h into a new header lustre_log_user.h.  One
of the functions is necessary for llog_reader to display useful
information for certain lustre log record types.  They are all related
to logid/fid conversion or access, and are not dependent on dt_object
like the rest of the material in lustre_log.h.

Also, llog_test_9() is added to llog_test.c, used in sanity.sh
test_60a to verify llog_reader.

Change-Id: I7120c391702fd5b8e18031bbe6e109d9e079690f
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-on: http://review.whamcloud.com/14120
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/Makefile.am
lustre/include/lustre_log.h
lustre/include/lustre_log_user.h [new file with mode: 0644]
lustre/obdclass/llog_test.c
lustre/tests/sanity.sh
lustre/utils/llog_reader.c