The function obdname2fsname() was updated to handle the case of
when tgt was for the format:
llite.lustre*.xattr_cache
llite.lustre-*.xattr_cache
but the case of tgt being exactly equal to the fsname is also
valid as in the case of sptlrpc: fsname.srpc.flavor.default.cli2ost
Change-Id: I9bb4082ee5f194842c7d72ae25e14f6998c0b8ed
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/30937
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
*/
ptr = strrchr(tgt, '-');
if (!ptr) {
- /* No '-' means it should end in '*' */
+ /* No '-' means it could end in '*' */
ptr = strchr(tgt, '*');
- if (!ptr)
- goto no_fsname;
+ if (!ptr) {
+ /* No '*' either. Assume tgt = fsname */
+ len = strlen(tgt);
+ goto valid_obd_name;
+ }
len = ptr - tgt;
goto valid_obd_name;
}
char fsname[MTI_NAME_MAXLEN];
struct sptlrpc_rule rule;
int rc;
- ENTRY;
+
+ ENTRY;
+ print_lustre_cfg(lcfg);
target = lustre_cfg_string(lcfg, 1);
if (target == NULL) {