From 0ff243e826cbb33919ea636370ce2d296ae5b99e Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 28 Mar 2007 20:04:48 +0000 Subject: [PATCH] Subject: fixed bug in MFSProcessOConfig and MPLoadTrace (patches submitted by communitiy) Category: fix Problem Ref: Organization: Contact: Ake Sandgren Description: # Enter a detailed description including how the issue was resolved, why it was necessary, customer impact, etc. git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@85 3f5042e3-fb1d-0410-be18-d6ca2573e517 --- CHANGELOG | 2 +- src/moab/MFS.c | 10 +++++++++- src/server/mprof.c | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 491ced5..6e99cc9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,6 @@ Maui 3.2.6p19 - - Implemented segfault fix submitted by Ake Sandgren + - Implemented fixes for a segfault, FSPOLICY loading, and workload traces submitted by Ake Sandgren - Implemented patch in MJobProcessExtensionString to avoid dropping first token (from Peter GardfjÀll) - Added SUSE service startup script (suse.maui.d) to "contrib" directory (thanks goes to Stephen Cary) diff --git a/src/moab/MFS.c b/src/moab/MFS.c index c9f728d..35113ea 100644 --- a/src/moab/MFS.c +++ b/src/moab/MFS.c @@ -855,6 +855,8 @@ int MFSProcessOConfig( char **SArray) /* I */ { + char *ptr; + if (F == NULL) { return(FAILURE); @@ -886,9 +888,15 @@ int MFSProcessOConfig( case pFSPolicy: - if (strchr(SVal,'%')) + if ((ptr = strchr(SVal,'%')) != NULL) + { MSched.PercentBasedFS = TRUE; + /* patch submitted by Ake Sandgren--assumes that % is always at the end of SVal */ + + *ptr = '\0'; + } + if (MUBoolFromString(SVal,FALSE) == TRUE) { /* enable backlevel support */ diff --git a/src/server/mprof.c b/src/server/mprof.c index 34c0206..45e797d 100644 --- a/src/server/mprof.c +++ b/src/server/mprof.c @@ -2302,6 +2302,7 @@ int MPLoadTrace( while (ptr < tail) { LineCount++; + Offset = 0; if (MTraceLoadWorkload(ptr,&Offset,&tmpJ,msmProfile,&Version) == SUCCESS) { @@ -2324,7 +2325,7 @@ int MPLoadTrace( if ((Profile.Host[0] != '\0') && (strcmp(Profile.Host,J->MasterHostName))) continue; - if ((J->Cred.Q != NULL) && !strstr(Profile.QOSList,J->Cred.Q->Name)) + if ((J->Cred.Q != NULL) && (Profile.QOSList[0] != '\0') && !strstr(Profile.QOSList,J->Cred.Q->Name)) continue; if (Profile.UserNameList[0][0] != '\0')