Whamcloud - gitweb
LU-4223 tests: delete loop device when umount 96/8296/2
authorwang di <di.wang@intel.com>
Fri, 15 Nov 2013 08:00:05 +0000 (00:00 -0800)
committerAndreas Dilger <andreas.dilger@intel.com>
Mon, 18 Nov 2013 18:32:47 +0000 (18:32 +0000)
Delete loop device with umount -d, to avoid loop device leaking.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I55bafefa1d387116333aafc71b599ef888c57a2b
Reviewed-on: http://review.whamcloud.com/8296
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
lustre/tests/conf-sanity.sh
lustre/tests/sanity-quota.sh
lustre/tests/sanity.sh

index 4784af7..32ee910 100644 (file)
@@ -1558,7 +1558,7 @@ t32_test() {
                        $r mount -t lustre -o loop,nosvc $tmp/mdt $tmp/mnt/mdt
                        $r lctl replace_nids $fsname-OST0000 $ostnid
                        $r lctl replace_nids $fsname-MDT0000 $nid
-                       $r umount $tmp/mnt/mdt
+                       $r umount -d $tmp/mnt/mdt
                fi
 
                mopts=loop,exclude=$fsname-OST0000
@@ -3449,7 +3449,7 @@ test_58() { # bug 22658
        # remove all files from the OBJECTS dir
        do_facet $SINGLEMDS "mount -t ldiskfs $opts $devname $MNTDIR"
        do_facet $SINGLEMDS "find $MNTDIR/O/1/d* -type f -delete"
-       do_facet $SINGLEMDS "umount $MNTDIR"
+       do_facet $SINGLEMDS "umount -d $MNTDIR"
        # restart MDS with missing llog files
        start_mds
        do_facet mds "lctl set_param fail_loc=0"
@@ -3675,7 +3675,7 @@ test_65() { # LU-2237
        do_facet $SINGLEMDS \
                "mount -t $(facet_fstype $SINGLEMDS) $opts $devname $brpt"
        do_facet $SINGLEMDS "rm -f ${brpt}/last_rcvd"
-       do_facet $SINGLEMDS "umount $brpt"
+       do_facet $SINGLEMDS "umount -d $brpt"
 
        # restart MDS, the "last_rcvd" file should be recreated.
        start_mds || error "fail to restart the MDS"
index e43d27f..4b55d22 100644 (file)
@@ -2281,7 +2281,7 @@ test_36() {
        do_node $mdt0_node mkdir $mntpt/OBJECTS
        do_node $mdt0_node cp $LUSTRE/tests/admin_quotafile_v2.usr $mntpt/OBJECTS
        do_node $mdt0_node cp $LUSTRE/tests/admin_quotafile_v2.grp $mntpt/OBJECTS
-       do_node $mdt0_node umount -f $mntpt
+       do_node $mdt0_node umount -d -f $mntpt
 
        echo "Setup all..."
        setupall
index 62fec65..00da642 100644 (file)
@@ -2160,7 +2160,7 @@ run_test 31o "duplicate hard links with same filename"
 
 cleanup_test32_mount() {
        trap 0
-       $UMOUNT $DIR/$tdir/ext2-mountpoint
+       $UMOUNT -d $DIR/$tdir/ext2-mountpoint
 }
 
 test_32a() {
@@ -2368,7 +2368,7 @@ run_test 32p "open d32p/symlink->tmp/symlink->lustre-root/$tfile"
 
 cleanup_testdir_mount() {
        trap 0
-       $UMOUNT $DIR/$tdir
+       $UMOUNT -d $DIR/$tdir
 }
 
 test_32q() {
@@ -3984,7 +3984,7 @@ test_54c() {
        dd if=/dev/zero of=$tdir/tmp bs=`page_size` count=30 || error "dd write"
        df $tdir
        dd if=$tdir/tmp of=/dev/zero bs=`page_size` count=30 || error "dd read"
-       $UMOUNT $tdir
+       $UMOUNT -d $tdir
        losetup -d $loopdev
        rm $loopdev
 }