From 4d22d9a6a7be61064a76f69ff3b8ca5b84b57f2c Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 13 Feb 2004 21:32:19 +0000 Subject: [PATCH] Land b_smallfix onto HEAD (20040213_1402) --- lnet/libcfs/debug.c | 4 ++ lustre/ChangeLog | 5 ++ lustre/ldlm/ldlm_lib.c | 3 +- lustre/llite/llite_lib.c | 2 + lustre/llite/rw.c | 4 +- lustre/osc/osc_request.c | 3 +- lustre/portals/libcfs/debug.c | 4 ++ lustre/ptlrpc/import.c | 4 +- lustre/ptlrpc/llog_net.c | 2 +- lustre/ptlrpc/recover.c | 5 +- lustre/scripts/cvs-modified-files.pl | 47 ------------------ lustre/scripts/cvsdiffclient | 26 ---------- lustre/scripts/land1.sh | 93 ------------------------------------ lustre/scripts/land2.sh | 28 ----------- lustre/tests/sanityN.sh | 2 +- lustre/utils/lconf | 2 +- 16 files changed, 30 insertions(+), 204 deletions(-) delete mode 100755 lustre/scripts/cvs-modified-files.pl delete mode 100755 lustre/scripts/cvsdiffclient delete mode 100755 lustre/scripts/land1.sh delete mode 100755 lustre/scripts/land2.sh diff --git a/lnet/libcfs/debug.c b/lnet/libcfs/debug.c index 09db54e..0bc93f3 100644 --- a/lnet/libcfs/debug.c +++ b/lnet/libcfs/debug.c @@ -806,6 +806,10 @@ portals_debug_msg(int subsys, int mask, char *file, const char *fn, tv.tv_sec, tv.tv_usec, stack, current->pid); max_nob -= prefix_nob; + if(*(format + strlen(format) - 1) != '\n') + printk(KERN_INFO "format at %s:%d:%s doesn't end in newline\n", + file, line, fn); + #if defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)) msg_nob = snprintf(debug_buf + debug_off + prefix_nob, max_nob, "%d:(%s:%d:%s()) ", diff --git a/lustre/ChangeLog b/lustre/ChangeLog index e19fb6d..40aa745 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -11,6 +11,11 @@ tbd Cluster File Systems, Inc. - conf-sanity test_5, proper cleanup in umount log not availale (2640) - recovery timer race (2670) - mdc_close recovey bug (2532) + - don't try to handle a message that hasn't been replied to (2699) + - don't fail assertion if in recovery during cleanup (2701) + - fix lconf error (2694) + * miscellania + - return LL_SUPER_MAGIC from statfs for the filesystem type (1972) 2004-02-07 Cluster File Systems, Inc. * version 1.0.4 diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 0629db2..9d4934e 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -557,7 +557,8 @@ void target_destroy_export(struct obd_export *exp) /* We cancel locks at disconnect time, but this will catch any locks * granted in a race with recovery-induced disconnect. */ - ldlm_cancel_locks_for_export(exp); + if (exp->exp_obd->obd_namespace != NULL) + ldlm_cancel_locks_for_export(exp); } /* diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index af7cbb7..a109b2d 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -951,6 +951,8 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs, RETURN(rc); } + osfs->os_type = sb->s_magic; + CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n", osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files); diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 8b1569d..7c4c791 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -110,9 +110,9 @@ void ll_truncate(struct inode *inode) CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino, inode->i_generation, inode); - /* object not yet allocated - this is handled in ll_setattr_raw */ if (!lsm) { - CERROR("truncate on inode %lu with no objects\n", inode->i_ino); + CDEBUG(D_INODE, "truncate on inode %lu with no objects\n", + inode->i_ino); EXIT; return; } diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 9ca56d8..b817a14 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1553,8 +1553,7 @@ static void osc_check_rpcs(struct client_obd *cli) ENTRY; while ((loi = osc_next_loi(cli)) != NULL) { - - LOI_DEBUG(loi, "%d in flight", cli->cl_brw_in_flight); + LOI_DEBUG(loi, "%d in flight\n", cli->cl_brw_in_flight); if (cli->cl_brw_in_flight >= cli->cl_max_rpcs_in_flight) break; diff --git a/lustre/portals/libcfs/debug.c b/lustre/portals/libcfs/debug.c index 09db54e..0bc93f3 100644 --- a/lustre/portals/libcfs/debug.c +++ b/lustre/portals/libcfs/debug.c @@ -806,6 +806,10 @@ portals_debug_msg(int subsys, int mask, char *file, const char *fn, tv.tv_sec, tv.tv_usec, stack, current->pid); max_nob -= prefix_nob; + if(*(format + strlen(format) - 1) != '\n') + printk(KERN_INFO "format at %s:%d:%s doesn't end in newline\n", + file, line, fn); + #if defined(__arch_um__) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)) msg_nob = snprintf(debug_buf + debug_off + prefix_nob, max_nob, "%d:(%s:%d:%s()) ", diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 63fd22b..2fd25ec 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -441,7 +441,9 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp) imp->imp_connection->c_remote_uuid.uuid); ptlrpc_set_import_active(imp, 1); - ptlrpc_resend(imp); + rc = ptlrpc_resend(imp); + if (rc) + GOTO(out, rc); IMPORT_SET_STATE(imp, LUSTRE_IMP_FULL); } diff --git a/lustre/ptlrpc/llog_net.c b/lustre/ptlrpc/llog_net.c index 0694bd1..7fc27fc 100644 --- a/lustre/ptlrpc/llog_net.c +++ b/lustre/ptlrpc/llog_net.c @@ -56,7 +56,7 @@ int llog_origin_connect(struct llog_ctxt *ctxt, int count, ENTRY; if (list_empty(&ctxt->loc_handle->u.chd.chd_head)) { - CDEBUG(D_HA, "there is no record related to ctxt %p", ctxt); + CDEBUG(D_HA, "there is no record related to ctxt %p\n", ctxt); RETURN(0); } diff --git a/lustre/ptlrpc/recover.c b/lustre/ptlrpc/recover.c index a569ab7..6c3a68b 100644 --- a/lustre/ptlrpc/recover.c +++ b/lustre/ptlrpc/recover.c @@ -191,7 +191,10 @@ int ptlrpc_resend(struct obd_import *imp) /* Well... what if lctl recover is called twice at the same time? */ spin_lock_irqsave(&imp->imp_lock, flags); - LASSERT(imp->imp_state == LUSTRE_IMP_RECOVER); + if (imp->imp_state != LUSTRE_IMP_RECOVER) { + spin_unlock_irqrestore(&imp->imp_lock, flags); + RETURN(-1); + } spin_unlock_irqrestore(&imp->imp_lock, flags); list_for_each_safe(tmp, pos, &imp->imp_sending_list) { diff --git a/lustre/scripts/cvs-modified-files.pl b/lustre/scripts/cvs-modified-files.pl deleted file mode 100755 index d13c4d3..0000000 --- a/lustre/scripts/cvs-modified-files.pl +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env perl - -my $mode = "NONE"; -my @modified, @added, @removed; - -while($line = <>) { - if ($line =~ /Modified Files:/) { - $mode = "MODIFIED"; - next; - } - - if ($line =~ /Added Files:/) { - $mode = "ADDED"; - next; - } - - if ($line =~ /Removed Files:/) { - $mode = "REMOVED"; - next; - } - - if ($mode eq "NONE") { next; } - if ($line =~ /-------/) { next; } - - chop($line); - $line =~ s/^CVS:\s+//; - $line =~ s/\s+$//; - # print "processing $line for $mode\n"; - @files = split(/ /, $line); - # print "new files for $mode: ", join(', ', @files), "\n"; - - if ($mode eq "MODIFIED") { - push(@modified, @files); - } elsif ($mode eq "ADDED") { - push(@added, @files); - } elsif ($mode eq "REMOVED") { - push(@removed, @files); - } else { - die "Unknown mode $mode!"; - } -} - -print join(' ', @modified); -if ($ENV{"SHOW_ALL_FILES"} ne "no") { - print ' ', join(' ', @added), ' ', join(' ', @removed); -} -print "\n"; diff --git a/lustre/scripts/cvsdiffclient b/lustre/scripts/cvsdiffclient deleted file mode 100755 index dab1e90..0000000 --- a/lustre/scripts/cvsdiffclient +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -[ -f .mergeinfo ] && . ./.mergeinfo - -FILES=`cvs-modified-files.pl $1` -TMP=`mktemp /tmp/cvslog-XXXXXXXX` -if [ -f $TMP ]; then - [ -f .mergeinfo ] && \ - echo "CVS: Update $child from $parent ($date)" >> $TMP - echo "CVS: did you update the ChangeLog for a bug fix?" >> $TMP - echo "CVS: b=" >> $TMP - echo "CVS: r=" >> $TMP - - cat $1 >> $TMP - cp $TMP $1 - rm $TMP -fi - -if [ "${FILES:+have_files}"x = have_filesx ]; then - echo Diffing $1 : $FILES - cvs diff -wbBup $FILES 2>/dev/null | sed "s/^/CVS: /" >>$1 -fi -#gnuclient $1 || vi $1 -[ "$EDITOR" ] || EDITOR=vi - -$EDITOR $1 diff --git a/lustre/scripts/land1.sh b/lustre/scripts/land1.sh deleted file mode 100755 index 0c07803..0000000 --- a/lustre/scripts/land1.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -e - -CONFLICTS=cvs-merge-conflicts -CVS=cvs - -if [ -f .mergeinfo ] ; then - echo ".mergeinfo exists - clean up first" - exit -fi - -if [ -f $CONFLICTS ] ; then - echo "$CONFLICTS exists - clean up first" - exit -fi - -if [ $# -lt 2 -o $# -gt 3 ]; then - echo "This is phase 1 of merging branches. Usage: $0 parent child [dir]" - exit -fi - -parent=$1 -PARENT=`echo $parent | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"` -child=$2 -CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"` -date=`date +%Y%m%d_%H%M` -module=lustre - -if [ "$parent" != "HEAD" -a "`cat CVS/Tag`" != "T$parent" ]; then - echo "This script must be run within the $parent branch" - exit 1 -fi - -dir=$3 - -if [ $parent != "HEAD" ]; then - parent="b_$parent" -fi -if [ $child != "HEAD" ]; then - child="b_$child" -fi - -cat << EOF > .mergeinfo -parent=$parent -PARENT=$PARENT -child=$child -CHILD=$CHILD -date=$date -module=$module -dir=$dir -CONFLICTS=$CONFLICTS -EOF - -echo PARENT $PARENT parent $parent CHILD $CHILD child $child date $date - -# Update your tree to the PARENT branch; HEAD is not really a branch, so you -# need to update -A instead of update -r HEAD, or the commit will fail. -p -echo -n "Updating to $parent ...." -if [ $parent == "HEAD" ]; then - $CVS update -AdP $dir -else - $CVS update -r $parent -dP $dir -fi -echo "done" - -echo -n "Tagging as ${PARENT}_${CHILD}_LAND_PARENT_$date ..." -$CVS tag ${PARENT}_${CHILD}_LAND_PARENT_$date $dir -echo "done" - -echo -n "Create land point on ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date ..." -$CVS rtag -r ${child} ${PARENT}_${CHILD}_LAND_CHILD_$date $module $dir -echo "done" - -echo -n "Preserve old base tag ${CHILD}_BASE as ${CHILD}_BASE_PREV ..." -$CVS tag -F -r ${CHILD}_BASE ${CHILD}_BASE_PREV $dir -echo "done" - -# Apply all of the changes to your local tree: -echo -n "Updating as -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_LAND_CHILD_$date ..." -$CVS update -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_LAND_CHILD_$date $dir -echo "done" - -echo -n "Recording conflicts in $CONFLICTS ..." -if $CVS update | grep '^C' > $CONFLICTS; then - echo "Conflicts found, fix before committing." - cat $CONFLICTS -else - echo "No conflicts found" - rm -f $CONFLICTS -fi -echo "done" - -echo "Test, commit and then run land2.sh (no arguments)" - diff --git a/lustre/scripts/land2.sh b/lustre/scripts/land2.sh deleted file mode 100755 index 6690e7d..0000000 --- a/lustre/scripts/land2.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -e - -CVS=cvs - -if [ ! -f .mergeinfo ] ; then - echo ".mergeinfo doesn't exist - exit" - exit -fi - -. .mergeinfo - -if [ -f $CONFLICTS ] ; then - echo "$CONFLICTS exists - clean up first" - cat $CONFLICTS - exit -fi - -cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1 - -echo -n "Tagging as ${CHILD}_BASE_$date ..." -$CVS tag -F ${CHILD}_BASE_$date $dir -echo "done" -echo -n "Tagging as ${CHILD}_BASE ..." -$CVS tag -F ${CHILD}_BASE $dir - -echo "saving .mergeinfo as .mergeinfo-$date" -mv .mergeinfo .mergeinfo-$date -echo "done" diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index f64ec44..703d378 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -168,7 +168,7 @@ test_2d() { chmod 755 $DIR1 $CHECKSTAT -t dir -p 0755 $DIR2 || error } -run_test 2c "check cached attribute updates on 2 mtpt's root ===" +run_test 2d "check cached attribute updates on 2 mtpt's root ===" test_3() { ( cd $DIR1 ; ln -s this/is/good lnk ) diff --git a/lustre/utils/lconf b/lustre/utils/lconf index 4e6b2ea..9225374 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf @@ -1371,7 +1371,7 @@ class MDSDEV(Module): self.active = 1 else: self.active = 0 - if self.active and config.group and config.group != ost.get_val('group'): + if self.active and config.group and config.group != mds.get_val('group'): self.active = 0 self.inode_size = self.db.get_val_int('inodesize', 0) -- 1.8.3.1