Whamcloud - gitweb
LU-12712 lod: fix warning message for non-SEL file 51/36351/3
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 1 Oct 2019 21:26:34 +0000 (15:26 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 9 Oct 2019 22:35:40 +0000 (22:35 +0000)
commit544fd725dc5773aa8fdd931e04eb51d658ee1686
treeba38d8b608f87c51842a001bae83f2bf28deb1cd
parenta38c587cbf3be2e9870941601f34e355e6dced2f
LU-12712 lod: fix warning message for non-SEL file

The warning message printed when the LCME_FL_EXTENSION flag is set on
a non-SEL file was incorrectly checking the component magic (usually
LOV_MAGIC_V3) instead of the file magic (should be LOV_MAGIC_SEL).
Don't redefine "magic" for each component, since this is only used in
one other place to mean the component magic, and use the actual file
or component magic in the few places where this is checked.

Fix the warning message to be rate-limited on the console by using
CWARN(...) instead of CDEBUG(D_WARNING, ...), though it is somewhat
questionable whether this should be a console message at all as there
is nothing that the administrator can do about this problem and it
doesn't appear to have any side-effects.  Also print the component
ID/index and restructure the message text so that it is more clear
about what the actual problem is.

Fix a few minor style issues in nearby code.

Test-Parameters: trivial testlist=sanity-pfl
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I81c3f9914512b1959b8483bb2b988ea4597cab07
Reviewed-on: https://review.whamcloud.com/36351
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Vitaly Fertman <c17818@cray.com>
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lod/lod_lov.c