Whamcloud - gitweb
- one more fid management correctness test.
authoryury <yury>
Tue, 16 Nov 2004 14:04:12 +0000 (14:04 +0000)
committeryury <yury>
Tue, 16 Nov 2004 14:04:12 +0000 (14:04 +0000)
lustre/mds/lproc_mds.c
lustre/tests/sanity-fid.sh

index 80fd37b..37d6d67 100644 (file)
@@ -116,7 +116,6 @@ static int lprocfs_rd_group(char *page, char **start, off_t off,
 {
         struct obd_device *obd = (struct obd_device *)data;
         struct mds_obd *mds = &obd->u.mds;
-        __u64 last_fid;
 
         *eof = 1;
         return snprintf(page, count, LPD64"\n", mds->mds_num);
index ebce17f..5d61718 100644 (file)
@@ -203,7 +203,7 @@ test_1a() {
        
        diff=$(($new_last_fid-$old_last_fid))
        [ $diff -ne 5000 ] && {
-           echo "invalid fid management: \
+           echo "invalid fid management on $MDS: \
                old $old_last_fid, new $new_last_fid"
            error
        }
@@ -211,6 +211,34 @@ test_1a() {
 }
 run_test 1a " fid managing correctness ============="
 
+test_1b() {
+        rm -fr $DIR/1b0 > /dev/null
+       MDS=`find /proc/fs/lustre/mds/* -type d | head -n1 | sed 's/.*\///'`
+       [ -z "$MDS" ] && {
+           echo "no MDS available, skipping test"
+           return 0
+       }
+       count=`find /proc/fs/lustre/mds/* -type d | wc -l`
+       [ $count -gt 1 ] && {
+           echo "more than 1 MDS is found, skipping test"
+           return 0
+       }
+
+       mkdir $DIR/1b0 || error
+       createmany -o $DIR/1b0/f 5000
+       old_last_fid=`cat /proc/fs/lustre/mds/$MDS/last_fid`
+       rm -fr $DIR/1b0/f
+       new_last_fid=`cat /proc/fs/lustre/mds/$MDS/last_fid`
+       
+       [ $new_last_fid -ne $old_last_fid ] && {
+           echo "invalid fid management on $MDS: \
+               old $old_last_fid, new $new_last_fid"
+           error
+       }
+        rm -fr $DIR/1b0 || error
+}
+run_test 1b " fid managing correctness ============="
+
 TMPDIR=$OLDTMPDIR
 TMP=$OLDTMP
 HOME=$OLDHOME