LU-15706 llog: deal with "SKIP" pool llog records correctly
If the requested "start" llog records by one ioctl are just the
useful ones "protected" by one marker, they will don't know their
cfg_flags(e.g. "SKIP" or not), and then will be mis-labeled in
class_config_yaml_output().
To fix this issue, this patch does the following changes:
- In kernel space, remember the marker cfg_flags for 10 records
earlier than the requested "start" in function llog_print_cb(),
so that the "start" can be output with its correct cfg_flags.
- In user space, since the pool_new/add record will be marked as
"SKIP" if its corresponding pool_destroy/remove record is logged
later in mgs_pool_cmd(), these "SKIP" records won't be printed
by function jt_llog_print_iter(), so lpd_ost_num doesn't need to
be decreased in callback function llog_search_pool_cb() as well,
otherwise, it will cause "lctl pool_destroy" error.
Test-Parameters: standalonemgs=true testlist=ost-pools
Test-Parameters: standalonemgs=true testlist=conf-sanity env=ONLY=123,HONOR_EXCEPT=y
Fixes:
2a5b50d20717 ("LU-15142 lctl: fixes for set_param -P and llog_print")
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: Ie45127ac8b80a75eaeb7158559c690da52eef103
Reviewed-on: https://review.whamcloud.com/46951
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>