Whamcloud - gitweb
LU-9153 utils: improve llog name parsing 68/25468/7
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 15 Feb 2017 06:28:39 +0000 (23:28 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 23 Mar 2017 01:41:44 +0000 (01:41 +0000)
commita7a0e4070fba3091edc4921769fe36cb6262697d
treeb3d94c950d81a55ce8507247b1738c603253ce3e
parent57fdfdb0dbdcfa7cf4b649f1a5a3d58412e781ad
LU-9153 utils: improve llog name parsing

Current llog name specification is totally non-standard for
lctl llog_print, llog_info, and related commands.  Change this
to accept llog names without the leading '$', since adding '$'
is non-intuitive and the shell will think this is a variable
and "$fsname-client" becomes "-client" unless it is escaped.

Similarly, llog identifiers were formatted like "#0x4:10#0000000"
instead of the standard FID format [0x4:0x10:0x0].  Update the
code to accept and print FIDs in normal format.

Add lctl-llog_print.8, lctl-llog_info.8, lctl-llog_catlist.8 man
pages.

Add a test case for parsing "lctl llog_print" with both old
and new input formats.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Idc00308162eb40b121b49bae3a6bc1d9326927fb
Reviewed-on: https://review.whamcloud.com/25468
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/doc/Makefile.am
lustre/doc/lctl-llog_catlist.8 [new file with mode: 0644]
lustre/doc/lctl-llog_info.8 [new file with mode: 0644]
lustre/doc/lctl-llog_print.8 [new file with mode: 0644]
lustre/doc/lctl.8
lustre/mgs/mgs_llog.c
lustre/obdclass/llog_ioctl.c
lustre/obdclass/obd_config.c
lustre/tests/sanity.sh
lustre/utils/lctl.c
lustre/utils/llog_reader.c