Whamcloud - gitweb
LU-7234 mgs: For handling dash in FSNAME 01/16901/3
authorRajesh T G <tg.rajesh@seagate.com>
Wed, 21 Oct 2015 09:42:26 +0000 (15:12 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 11 Jul 2016 23:53:20 +0000 (23:53 +0000)
For FSNAME 'lustre-1, function mgs_llog_open() in mgs_handler.c has
been modified to call strrchr instead of strchr so that 'logname'
variable is updated with entire FSNAME including '-'.

Seagate-bug-id: MRP-2790
Signed-off-by: Sundarraj Illindra <sundarraj.illindra@seagate.com>
Change-Id: I07b2b874f4cf881d0aa2c07586a113fcce8bebfe
Reviewed-on: http://review.whamcloud.com/16901
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mgs/mgs_handler.c

index b6aaca3..c4ce666 100644 (file)
@@ -565,7 +565,7 @@ static int mgs_llog_open(struct tgt_session_info *tsi)
 
        logname = req_capsule_client_get(tsi->tsi_pill, &RMF_NAME);
        if (logname) {
-               char *ptr = strchr(logname, '-');
+               char *ptr = strrchr(logname, '-');
                int   len = (ptr != NULL) ? (int)(ptr - logname) : 0;
 
                if (ptr == NULL || len >= sizeof(mgi->mgi_fsname)) {