Skip to content
Snippets Groups Projects
Commit bed64d38 authored by Bobi Jam's avatar Bobi Jam
Browse files

Branch HEAD

b=14136
i=nathan
i=shadow

Description: make mgs_setparam() handle fsname containing dash
Details    : fsname containing a dash does not work with lctl conf_param
parent cf814617
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,11 @@ ...@@ -12,6 +12,11 @@
* Recommended e2fsprogs version: 1.40.2-cfs5 * Recommended e2fsprogs version: 1.40.2-cfs5
* Note that reiserfs quotas are disabled on SLES 10 in this kernel. * Note that reiserfs quotas are disabled on SLES 10 in this kernel.
Severity : normal
Bugzilla : 14136
Description: make mgs_setparam() handle fsname containing dash
Details : fsname containing a dash does not work with lctl conf_param
Severity : enhancement Severity : enhancement
Bugzilla : 14388 Bugzilla : 14388
Description: Update to SLES10 SP1 latest kernel-2.6.16.54-0.2.3. Description: Update to SLES10 SP1 latest kernel-2.6.16.54-0.2.3.
......
...@@ -2420,6 +2420,7 @@ int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname) ...@@ -2420,6 +2420,7 @@ int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname)
struct mgs_target_info *mti; struct mgs_target_info *mti;
char *devname, *param; char *devname, *param;
char *ptr, *tmp; char *ptr, *tmp;
__u32 index;
int rc = 0; int rc = 0;
ENTRY; ENTRY;
...@@ -2444,13 +2445,13 @@ int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname) ...@@ -2444,13 +2445,13 @@ int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname)
} }
/* Extract fsname */ /* Extract fsname */
ptr = strchr(devname, '-'); ptr = strrchr(devname, '-');
memset(fsname, 0, MTI_NAME_MAXLEN); memset(fsname, 0, MTI_NAME_MAXLEN);
if (!ptr) { if (ptr && (server_name2index(ptr, &index, NULL) >= 0)) {
strncpy(fsname, devname, ptr - devname);
} else {
/* assume devname is the fsname */ /* assume devname is the fsname */
strncpy(fsname, devname, MTI_NAME_MAXLEN); strncpy(fsname, devname, MTI_NAME_MAXLEN);
} else {
strncpy(fsname, devname, ptr - devname);
} }
fsname[MTI_NAME_MAXLEN - 1] = 0; fsname[MTI_NAME_MAXLEN - 1] = 0;
CDEBUG(D_MGS, "setparam on fs %s device %s\n", fsname, devname); CDEBUG(D_MGS, "setparam on fs %s device %s\n", fsname, devname);
......
...@@ -1190,7 +1190,8 @@ test_32b() { ...@@ -1190,7 +1190,8 @@ test_32b() {
run_test 32b "Upgrade from 1.4 with writeconf" run_test 32b "Upgrade from 1.4 with writeconf"
test_33() { # bug 12333 test_33() { # bug 12333
local FSNAME2=test1234 local rc=0
local FSNAME2=test-123
local fs2mds_HOST=$mds_HOST local fs2mds_HOST=$mds_HOST
local fs2ost_HOST=$ost_HOST local fs2ost_HOST=$ost_HOST
[ -n "$ost1_HOST" ] && fs2ost_HOST=$ost1_HOST [ -n "$ost1_HOST" ] && fs2ost_HOST=$ost1_HOST
...@@ -1207,15 +1208,17 @@ test_33() { # bug 12333 ...@@ -1207,15 +1208,17 @@ test_33() { # bug 12333
start fs2mds $fs2mdsdev $MDS_MOUNT_OPTS start fs2mds $fs2mdsdev $MDS_MOUNT_OPTS
start fs2ost $fs2ostdev $OST_MOUNT_OPTS start fs2ost $fs2ostdev $OST_MOUNT_OPTS
do_facet mds "$LCTL conf_param $FSNAME2.sys.timeout=200" || rc=1
mkdir -p $MOUNT2 mkdir -p $MOUNT2
mount -t lustre $MGSNID:/${FSNAME2} $MOUNT2 || return 1 mount -t lustre $MGSNID:/${FSNAME2} $MOUNT2 || rc=2
echo "ok." echo "ok."
umount -d $MOUNT2 umount -d $MOUNT2
stop fs2ost -f stop fs2ost -f
stop fs2mds -f stop fs2mds -f
rm -rf $MOUNT2 $fs2mdsdev $fs2ostdev rm -rf $MOUNT2 $fs2mdsdev $fs2ostdev
cleanup_nocli || return 6 cleanup_nocli || rc=6
return $rc
} }
run_test 33 "Mount ost with a large index number" run_test 33 "Mount ost with a large index number"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment