Whamcloud - gitweb
b=22505 Initialize cui_tot_nregs for liblustre
authorRobert Read <rread@sun.com>
Sat, 3 Apr 2010 02:01:53 +0000 (19:01 -0700)
committerRobert Read <rread@sun.com>
Wed, 7 Apr 2010 15:31:44 +0000 (08:31 -0700)
Change 910bf010 inadvertantly broke liblustre because cio->cui_tot_nregs
was not initilized, and ccc_io_update_iov was setting cui_nregs
incorrectly.

i=eric.mei
i=yong.fan

lustre/liblustre/rw.c
lustre/tests/liblustre.sh
lustre/tests/test-framework.sh

index 2b9581e..aeff8db 100644 (file)
@@ -344,6 +344,7 @@ ssize_t llu_file_prwv(const struct iovec *iovec, int iovlen,
                 /* XXX this is not right: cio->cui_iov can be modified. */
                 cio->cui_iov = (struct iovec *)iovec;
                 cio->cui_nrsegs = iovlen;
                 /* XXX this is not right: cio->cui_iov can be modified. */
                 cio->cui_iov = (struct iovec *)iovec;
                 cio->cui_nrsegs = iovlen;
+                cio->cui_tot_nrsegs = iovlen;
                 sio->sio_session = session;
                 err = cl_io_loop(env, io);
         } else {
                 sio->sio_session = session;
                 err = cl_io_loop(env, io);
         } else {
index daf7f5a..638e198 100644 (file)
@@ -28,6 +28,7 @@ test_1() {
        skip "$LIBLUSTRETESTS/sanity: not found"
     else
        mkdir -p $MOUNT2
        skip "$LIBLUSTRETESTS/sanity: not found"
     else
        mkdir -p $MOUNT2
+       echo $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
        $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
        if [ "$LIBLUSTRE_EXCEPT" ]; then
            LIBLUSTRE_OPT="$LIBLUSTRE_OPT \
        $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
        if [ "$LIBLUSTRE_EXCEPT" ]; then
            LIBLUSTRE_OPT="$LIBLUSTRE_OPT \
@@ -38,3 +39,7 @@ test_1() {
     fi
 }
 run_test 1 "liblustre sanity"
     fi
 }
 run_test 1 "liblustre sanity"
+
+banner "test complete, cleaning up"
+check_and_cleanup_lustre
+[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true
index be08a46..10edcd3 100644 (file)
@@ -262,7 +262,7 @@ load_module() {
            (($# > 0)) && shift 2
 
             # Ensure we have accept=all for lnet
            (($# > 0)) && shift 2
 
             # Ensure we have accept=all for lnet
-            if [ $module = lnet ]; then
+            if [ $(basename $module) = lnet ]; then
                 # OK, this is a bit wordy...
                 local arg accept_all_present=false
                 for arg in "$@"; do
                 # OK, this is a bit wordy...
                 local arg accept_all_present=false
                 for arg in "$@"; do