Whamcloud - gitweb
Update b1_2 from HEAD (20040316_1727)
authoradilger <adilger>
Wed, 17 Mar 2004 01:02:59 +0000 (01:02 +0000)
committeradilger <adilger>
Wed, 17 Mar 2004 01:02:59 +0000 (01:02 +0000)
b=2939

12 files changed:
lustre/ChangeLog
lustre/kernel_patches/targets/hp_pnnl-2.4.target
lustre/kernel_patches/targets/rh-2.4.target
lustre/lvfs/fsfilt_ext3.c
lustre/mds/handler.c
lustre/scripts/lbuild
lustre/scripts/lmake
lustre/scripts/lustre-kernel-2.4.spec.in
lustre/tests/.RC_CURRENT.tag
lustre/tests/conf-sanity.sh
lustre/tests/sanityN.sh
lustre/utils/lmc

index 3913003..8d918da 100644 (file)
@@ -13,6 +13,7 @@ tbd  Cluster File Systems, Inc. <info@clusterfs.com>
        - fix race in target_handle_connect (2898)
        - mds_reint_create() should take same inode create lock (2926)
        - correct journal credits calculated for CANCEL_UNLINK_LOG (2931)
+       - allow MDS with the same name as client node (2939)
        - hold dentry reference for closed log files for unlink (2325)
        - reserve space for all logs during transactions (2059)
        - don't evict page beyond end of stripe extent (2925)
index a16acce..0d60be7 100644 (file)
@@ -2,6 +2,7 @@ KERNEL=linux-2.4.20-hp_pnnl.tar.gz
 SERIES=hp-pnnl-2.4.20
 VERSION=2.4.20
 EXTRA_VERSION=hp_pnnl_lustre
+RHBUILD=0
 
 BASE_ARCHS="ia64"
 BIGMEM_ARCHS=""
index 275cfff..cca5324 100644 (file)
@@ -2,6 +2,7 @@ KERNEL=linux-2.4.20-28.9.tar.gz
 SERIES=rh-2.4.20
 VERSION=2.4.20
 EXTRA_VERSION=28.9_lustre
+RHBUILD=1
 
 BASE_ARCHS="i586"
 BIGMEM_ARCHS=""
index 1b541ed..5c19b0c 100644 (file)
@@ -78,7 +78,8 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private,
         void *handle;
 
         if (current->journal_info) {
-                CDEBUG(D_INODE, "increasing refcount on %p\n", current->journal_info);
+                CDEBUG(D_INODE, "increasing refcount on %p\n",
+                       current->journal_info);
                 goto journal_start;
         }
 
@@ -114,6 +115,8 @@ static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private,
                 nblocks += 1;
                 break;
         case FSFILT_OP_CANCEL_UNLINK:
+                /* blocks for log header bitmap update OR
+                 * blocks for catalog header bitmap update + unlink of logs */
                 nblocks = (LLOG_CHUNK_SIZE >> inode->i_blkbits) +
                         EXT3_DELETE_TRANS_BLOCKS * logs;
                 break;
index 5a50482..54a69e6 100644 (file)
@@ -321,6 +321,9 @@ static int mds_destroy_export(struct obd_export *export)
         med = &export->exp_mds_data;
         target_destroy_export(export);
 
+        if (obd_uuid_equals(&export->exp_client_uuid, &obd->obd_uuid))
+                GOTO(out, 0);
+
         push_ctxt(&saved, &obd->obd_ctxt, NULL);
         /* Close any open files (which may also cause orphan unlinking). */
         spin_lock(&med->med_open_lock);
@@ -350,6 +353,7 @@ static int mds_destroy_export(struct obd_export *export)
         spin_unlock(&med->med_open_lock);
         pop_ctxt(&saved, &obd->obd_ctxt, NULL);
 
+out:
         mds_client_free(export, !(export->exp_flags & OBD_OPT_FAILOVER));
 
         RETURN(rc);
index 0e682c5..2c76308 100755 (executable)
@@ -308,6 +308,7 @@ prep_build()
        -e "s/@JENSEN_ARCHS@/$BOOT_ARCHS/g" \
        -e "s/@SMP_ARCHS@/$SMP_ARCHS/g" \
        -e "s/@UP_ARCHS@/$UP_ARCHS/g" \
+       -e "s/@RHBUILD@/$RHBUILD/g" \
        < $TOPDIR/lustre/scripts/lustre-kernel-2.4.spec.in \
        > lustre-kernel-2.4.spec
     [ -d SRPMS ] || mkdir SRPMS
@@ -337,11 +338,11 @@ build()
     done
 
     rpmbuild $targets -bb lustre-kernel-2.4.spec \
-       --define "_topdir $TOPDIR" \
+       --define "_topdir $TOPDIR" || \
        fatal 1 "Error building rpms for $arch."
 
     (( $DO_SRC )) && rpmbuild -bs lustre-kernel-2.4.spec \
-       --define "_topdir $TOPDIR" \
+       --define "_topdir $TOPDIR" || \
        fatal 1 "Error building .src.rpm."
 }
 
index 8a5143e..a79f89b 100755 (executable)
@@ -219,7 +219,6 @@ load_target()
     else
        EXTRA_VERSION="${EXTRA_VERSION}_lustre.$(get_lustre_version)"
     fi
-    EXTRA_VERSION=${EXTRA_VERSION//-/_}
 }
 
 tarflags()
index 3fef13d..0ff57ea 100644 (file)
@@ -20,6 +20,7 @@ Summary: The Linux kernel (the core of the Linux operating system)
 
 %define nptlarchs %{all_x86}
 #define nptlarchs noarch
+%define rhbuild @RHBUILD@
 
 # disable build root strip policy
 %define __spec_install_post /usr/lib/rpm/brp-compress || :
@@ -504,8 +505,11 @@ rm -f $RPM_BUILD_ROOT/usr/include/linux
 
 rm -rf $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/savedheaders
 
+%if %{rhbuild}
 # fix up the tmp_include_depends file wrt the buildroot
 perl -p -i -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/tmp_include_depends
+%endif
+
 popd >/dev/null
 %endif
 
@@ -735,7 +739,9 @@ exit 0
 /usr/src/linux-%{KVERREL}/arch/sparc64
 %endif
 /usr/src/linux-%{KVERREL}/drivers
+%if %{rhbuild}
 /usr/src/linux-%{KVERREL}/crypto
+%endif
 /usr/src/linux-%{KVERREL}/fs
 /usr/src/linux-%{KVERREL}/init
 /usr/src/linux-%{KVERREL}/ipc
@@ -754,12 +760,16 @@ exit 0
 %{?ibcs_1:/usr/src/linux-%{KVERREL}/include/abi}
 %endif
 /usr/src/linux-%{KVERREL}/include/linux
+%if %{rhbuild}
 /usr/src/linux-%{KVERREL}/include/rxrpc
+%endif
 /usr/src/linux-%{KVERREL}/include/net
 /usr/src/linux-%{KVERREL}/include/pcmcia
 /usr/src/linux-%{KVERREL}/include/scsi
 /usr/src/linux-%{KVERREL}/include/video
+%if %{rhbuild}
 /usr/src/linux-%{KVERREL}/tmp_include_depends
+%endif
 %dir /usr/src/linux-%{KVERREL}/include
 %dir /usr/src/linux-%{KVERREL}/arch
 %ifarch alpha sparc
index 69979fe..f2483c3 100644 (file)
@@ -341,20 +341,36 @@ test_9() {
 run_test 9 "test --ptldebug and --subsystem for lmc and lconf"
 
 test_10() {
+        echo "generate configuration with the same name for node and mds"
         OLDXMLCONFIG=$XMLCONFIG
         XMLCONFIG="broken.xml"
         [ -f "$XMLCONFIG" ] && rm -f $XMLCONFIG
-        SAMENAME="mds1"
-        do_lmc --add node --node $SAMENAME
-        do_lmc --add net --node $SAMENAME --nid $SAMENAME --nettype tcp
-        do_lmc --add mds --node $SAMENAME --mds $SAMENAME --nid $SAMENAME \
-               --fstype ext3 --dev /dev/mds1 || return $?
-        do_lmc --add lov --lov lov1 --mds $SAMENAME --stripe_sz 65536 \
-               --stripe_cnt 1 --stripe_pattern 0 || return $?
+        facet="mds"
+        rm -f ${facet}active
+        add_facet $facet
+        echo "the name for node and mds is the same"
+        do_lmc --add mds --node ${facet}_facet --mds ${facet}_facet \
+            --dev $MDSDEV --size $MDSSIZE || return $?
+        do_lmc --add lov --mds ${facet}_facet --lov lov1 --stripe_sz \
+            $STRIPE_BYTES --stripe_cnt $STRIPES_PER_OBJ \
+            --stripe_pattern 0 || return $?
+        add_ost ost --lov lov1 --dev $OSTDEV --size $OSTSIZE
+        facet="client"
+        add_facet $facet --lustre_upcall $UPCALL
+        do_lmc --add mtpt --node ${facet}_facet --mds mds_facet \
+            --lov lov1 --path $MOUNT
+
+        echo "mount lustre"
+        start_ost
+        start_mds
+        mount_client $MOUNT
+        check_mount || return 41
+        cleanup || return $?
+
         echo "Success!"
         XMLCONFIG=$OLDXMLCONFIG
 }
-run_test 10 "use lmc with the same name for node and mds"
+run_test 10 "mount lustre with the same name for node and mds"
 
 test_11() {
         OLDXMLCONFIG=$XMLCONFIG
@@ -630,4 +646,29 @@ test_16() {
 }
 run_test 16 "verify that lustre will correct the mode of OBJECTS/LOGS/PENDING"
 
+test_17() {
+        TMPMTPT="/mnt/conf17"
+
+        if [ ! -f "$MDSDEV" ]; then
+            echo "no $MDSDEV existing, so mount Lustre to create one"
+            start_ost
+            start_mds
+            mount_client $MOUNT
+            check_mount || return 41
+            cleanup || return $?
+        fi
+
+        echo "Remove mds config log"
+        [ -d $TMPMTPT ] || mkdir -p $TMPMTPT
+        mount -o loop -t ext3 $MDSDEV $TMPMTPT || return $?
+        rm -f $TMPMTPT/LOGS/mds_svc || return $?
+        umount $TMPMTPT || return $?
+
+        start_ost
+       start mds $MDSLCONFARGS && return 42
+        cleanup || return $?
+}
+run_test 17 "Verify failed mds_postsetup won't fail assertion (2936)"
+
+
 equals_msg "Done"
index b15e2bf..756ffdb 100644 (file)
@@ -234,7 +234,6 @@ test_10a() {
 run_test 10a "write of file with sub-page size on multiple mounts "
 
 test_10b() {
-       set -vx
        yes "R" | dd of=$DIR1/f10b bs=3k count=1 || error "dd $DIR1"
 
        truncate $DIR1/f10b 4096 || error "truncate 4096"
index f4deff5..98a56db 100755 (executable)
@@ -876,7 +876,7 @@ def add_lov(gen, lustre, options):
     # add an lovconfig entry to the active mdsdev profile
     lovconfig_name = new_name('LVCFG_' + name)
     lovconfig_uuid = new_uuid(lovconfig_name)
-    mds = findByName(lustre, mds_name)
+    mds = findByName(lustre, mds_name, "mds")
     mds.appendChild(gen.ref("lovconfig", lovconfig_uuid))
     lovconfig = gen.lovconfig(lovconfig_name, lovconfig_uuid, uuid)
     lustre.appendChild(lovconfig)