From 5b90c0af06ae0f6363010524307168e43ebfa734 Mon Sep 17 00:00:00 2001 From: adilger Date: Thu, 12 Jan 2006 07:50:21 +0000 Subject: [PATCH] Branch b_release_1_4_6 Dbench failing to run properly because the clients.txt file is truncated. rundbench verifies that the file has a non-zero size instead of just existing. r=brian --- lnet/include/libcfs/kp30.h | 5 ++++- lustre/include/linux/lustre_log.h | 2 +- lustre/lvfs/lvfs_linux.c | 6 ++++-- lustre/tests/rundbench | 5 +++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lnet/include/libcfs/kp30.h b/lnet/include/libcfs/kp30.h index c3c4a8c..58f6cfd 100644 --- a/lnet/include/libcfs/kp30.h +++ b/lnet/include/libcfs/kp30.h @@ -37,7 +37,7 @@ #else #define LASSERT(e) #define LASSERTF(cond, fmt...) do { } while (0) -#endif +#endif /* LIBCFS_DEBUG */ /* LBUG_WITH_LOC defined in lnet//kp30.h */ #define LBUG() LBUG_WITH_LOC(__FILE__, __FUNCTION__, __LINE__) @@ -197,7 +197,10 @@ do { \ # define printk(format, args...) printf (format, ## args) # define LIBCFS_ALLOC(ptr, size) do { (ptr) = calloc(1,size); } while (0); # define LIBCFS_FREE(a, b) do { free(a); } while (0); + void libcfs_debug_dumplog(void); +int libcfs_debug_init(unsigned long bufsize); +int libcfs_debug_cleanup(void); #endif /* diff --git a/lustre/include/linux/lustre_log.h b/lustre/include/linux/lustre_log.h index b3ccea3..9b95bd2 100644 --- a/lustre/include/linux/lustre_log.h +++ b/lustre/include/linux/lustre_log.h @@ -190,7 +190,7 @@ struct llog_ctxt { int loc_idx; /* my index the obd array of ctxt's */ struct llog_gen loc_gen; struct obd_device *loc_obd; /* points back to the containing obd*/ - struct obd_export *loc_exp; + struct obd_export *loc_exp; /* parent "disk" export (e.g. MDS) */ struct obd_import *loc_imp; /* to use in RPC's: can be backward pointing import */ struct llog_operations *loc_logops; diff --git a/lustre/lvfs/lvfs_linux.c b/lustre/lvfs/lvfs_linux.c index 0a0e8b3..3a8e87a 100644 --- a/lustre/lvfs/lvfs_linux.c +++ b/lustre/lvfs/lvfs_linux.c @@ -194,8 +194,10 @@ void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx, atomic_read(¤t->fs->pwdmnt->mnt_count)); */ - LASSERT(current->fs->pwd == new_ctx->pwd); - LASSERT(current->fs->pwdmnt == new_ctx->pwdmnt); + LASSERTF(current->fs->pwd == new_ctx->pwd, "%p != %p\n", + current->fs->pwd, new_ctx->pwd); + LASSERTF(current->fs->pwdmnt == new_ctx->pwdmnt, "%p != %p\n", + current->fs->pwdmnt, new_ctx->pwdmnt); set_fs(saved->fs); set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd); diff --git a/lustre/tests/rundbench b/lustre/tests/rundbench index b23ea12..09a0549 100755 --- a/lustre/tests/rundbench +++ b/lustre/tests/rundbench @@ -5,9 +5,10 @@ DIR=${DIR:-$MNT/`hostname`} mkdir -p $DIR TGT=$DIR/client.txt SRC=${SRC:-/usr/lib/dbench/client.txt} -[ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT +[ ! -s $TGT -a -s $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT SRC=/usr/lib/dbench/client_plain.txt -[ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT +[ ! -s $TGT -a -s $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT +[ ! -s $TGT ] && echo "$TGT doesn't exist" && exit 1 cd $DIR echo "running 'dbench $@' on $PWD at `date`" dbench -c client.txt $@ -- 1.8.3.1