Whamcloud - gitweb
Merge b1_5 from b1_4 (20060708_2140)
authorscjody <scjody>
Tue, 11 Jul 2006 16:18:10 +0000 (16:18 +0000)
committerscjody <scjody>
Tue, 11 Jul 2006 16:18:10 +0000 (16:18 +0000)
22 files changed:
ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch
ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch
ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch
lustre/include/linux/lustre_fsfilt.h
lustre/include/obd_class.h
lustre/include/obd_support.h
lustre/kernel_patches/patches/ext3-extents-2.4.21-chaos.patch
lustre/kernel_patches/patches/ext3-extents-2.4.21-suse2.patch
lustre/kernel_patches/patches/ext3-extents-2.4.24.patch
lustre/kernel_patches/patches/ext3-extents-2.6.12.patch
lustre/kernel_patches/patches/ext3-extents-2.6.5.patch
lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch
lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch
lustre/liblustre/rw.c
lustre/liblustre/tests/sanity.c
lustre/mds/handler.c
lustre/obdclass/class_obd.c
lustre/obdclass/lprocfs_status.c
lustre/obdfilter/filter.c
lustre/obdfilter/filter_io.c
lustre/tests/replay-ost-single.sh
lustre/tests/sanityN.sh

index 2c65544..68dacb6 100644 (file)
@@ -2,7 +2,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 ===================================================================
 --- linux-2.6.12-rc6.orig/fs/ext3/extents.c    2005-06-14 16:31:25.756503133 +0200
 +++ linux-2.6.12-rc6/fs/ext3/extents.c 2005-06-14 16:31:25.836581257 +0200
-@@ -0,0 +1,2353 @@
+@@ -0,0 +1,2359 @@
 +/*
 + * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -560,6 +560,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +
 +      ix->ei_block = logical;
 +      ix->ei_leaf = ptr;
++      ix->ei_leaf_hi = ix->ei_unused = 0;
 +      curp->p_hdr->eh_entries++;
 +
 +      EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
@@ -722,6 +723,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +              fidx = EXT_FIRST_INDEX(neh);
 +              fidx->ei_block = border;
 +              fidx->ei_leaf = oldblock;
++              fidx->ei_leaf_hi = fidx->ei_unused = 0;
 +
 +              ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
 +                        i, newblock, border, oldblock);
@@ -855,6 +857,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +      /* FIXME: it works, but actually path[0] can be index */
 +      curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
 +      curp->p_idx->ei_leaf = newblock;
++      curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
 +
 +      neh = EXT_ROOT_HDR(tree);
 +      fidx = EXT_FIRST_INDEX(neh);
@@ -1403,6 +1406,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +      if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
 +              ex->ee_block = cex->ec_block;
 +              ex->ee_start = cex->ec_start;
++              ex->ee_start_hi = 0;
 +              ex->ee_len = cex->ec_len;
 +              ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
 +                        (unsigned long) block,
@@ -1624,7 +1628,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +
 +              if (num == 0) {
 +                      /* this extent is removed entirely mark slot unused */
-+                      ex->ee_start = 0;
++                      ex->ee_start = ex->ee_start_hi = 0;
 +                      eh->eh_entries--;
 +                      fu = ex;
 +              }
@@ -1646,7 +1650,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +              while (lu < le) {
 +                      if (lu->ee_start) {
 +                              *fu = *lu;
-+                              lu->ee_start = 0;
++                              lu->ee_start = lu->ee_start_hi = 0;
 +                              fu++;
 +                      }
 +                      lu++;
@@ -2001,6 +2005,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +              /* allocate new block for the extent */
 +              goal = ext3_ext_find_goal(inode, path, ex->ee_block);
 +              ex->ee_start = ext3_new_block(handle, inode, goal, err);
++              ex->ee_start_hi = 0;
 +              if (ex->ee_start == 0) {
 +                      /* error occured: restore old extent */
 +                      ex->ee_start = newblock;
@@ -2116,6 +2121,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +      /* try to insert new extent into found leaf and return */
 +      newex.ee_block = iblock;
 +      newex.ee_start = newblock;
++      newex.ee_start_hi = 0;
 +      newex.ee_len = 1;
 +      err = ext3_ext_insert_extent(handle, &tree, path, &newex);
 +      if (err)
index be0642f..a99c695 100644 (file)
@@ -3,7 +3,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 ===================================================================
 --- linux-2.6.5-sles9.orig/fs/ext3/extents.c   2005-02-17 22:07:57.023609040 +0300
 +++ linux-2.6.5-sles9/fs/ext3/extents.c        2005-02-23 01:02:37.396435640 +0300
-@@ -0,0 +1,2355 @@
+@@ -0,0 +1,2361 @@
 +/*
 + * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -561,6 +561,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +
 +      ix->ei_block = logical;
 +      ix->ei_leaf = ptr;
++      ix->ei_leaf_hi = ix->ei_unused = 0;
 +      curp->p_hdr->eh_entries++;
 +
 +      EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
@@ -723,6 +724,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +              fidx = EXT_FIRST_INDEX(neh);
 +              fidx->ei_block = border;
 +              fidx->ei_leaf = oldblock;
++              fidx->ei_leaf_hi = fidx->ei_unused = 0;
 +
 +              ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
 +                        i, newblock, border, oldblock);
@@ -856,6 +858,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +      /* FIXME: it works, but actually path[0] can be index */
 +      curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
 +      curp->p_idx->ei_leaf = newblock;
++      curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
 +
 +      neh = EXT_ROOT_HDR(tree);
 +      fidx = EXT_FIRST_INDEX(neh);
@@ -1404,6 +1407,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +      if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
 +              ex->ee_block = cex->ec_block;
 +              ex->ee_start = cex->ec_start;
++              ex->ee_start_hi = 0;
 +              ex->ee_len = cex->ec_len;
 +              ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
 +                        (unsigned long) block,
@@ -1625,7 +1629,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +
 +              if (num == 0) {
 +                      /* this extent is removed entirely mark slot unused */
-+                      ex->ee_start = 0;
++                      ex->ee_start = ex->ee_start_hi = 0;
 +                      eh->eh_entries--;
 +                      fu = ex;
 +              }
@@ -1647,7 +1651,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +              while (lu < le) {
 +                      if (lu->ee_start) {
 +                              *fu = *lu;
-+                              lu->ee_start = 0;
++                              lu->ee_start = lu->ee_start_hi = 0;
 +                              fu++;
 +                      }
 +                      lu++;
@@ -2002,6 +2006,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +              /* allocate new block for the extent */
 +              goal = ext3_ext_find_goal(inode, path, ex->ee_block);
 +              ex->ee_start = ext3_new_block(handle, inode, goal, err);
++              ex->ee_start_hi = 0;
 +              if (ex->ee_start == 0) {
 +                      /* error occured: restore old extent */
 +                      ex->ee_start = newblock;
@@ -2117,6 +2122,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +      /* try to insert new extent into found leaf and return */
 +      newex.ee_block = iblock;
 +      newex.ee_start = newblock;
++      newex.ee_start_hi = 0;
 +      newex.ee_len = 1;
 +      err = ext3_ext_insert_extent(handle, &tree, path, &newex);
 +      if (err)
index def228e..314dd58 100644 (file)
@@ -2,7 +2,7 @@ Index: linux-stage/fs/ext3/extents.c
 ===================================================================
 --- linux-stage.orig/fs/ext3/extents.c 2005-02-25 15:33:48.890198160 +0200
 +++ linux-stage/fs/ext3/extents.c      2005-02-25 15:33:48.917194056 +0200
-@@ -0,0 +1,2353 @@
+@@ -0,0 +1,2359 @@
 +/*
 + * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -560,6 +560,7 @@ Index: linux-stage/fs/ext3/extents.c
 +
 +      ix->ei_block = logical;
 +      ix->ei_leaf = ptr;
++      ix->ei_leaf_hi = ix->ei_unused = 0;
 +      curp->p_hdr->eh_entries++;
 +
 +      EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
@@ -722,6 +723,7 @@ Index: linux-stage/fs/ext3/extents.c
 +              fidx = EXT_FIRST_INDEX(neh);
 +              fidx->ei_block = border;
 +              fidx->ei_leaf = oldblock;
++              fidx->ei_leaf_hi = fidx->ei_unused = 0;
 +
 +              ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
 +                        i, newblock, border, oldblock);
@@ -855,6 +857,7 @@ Index: linux-stage/fs/ext3/extents.c
 +      /* FIXME: it works, but actually path[0] can be index */
 +      curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
 +      curp->p_idx->ei_leaf = newblock;
++      curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
 +
 +      neh = EXT_ROOT_HDR(tree);
 +      fidx = EXT_FIRST_INDEX(neh);
@@ -1403,6 +1406,7 @@ Index: linux-stage/fs/ext3/extents.c
 +      if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
 +              ex->ee_block = cex->ec_block;
 +              ex->ee_start = cex->ec_start;
++              ex->ee_start_hi = 0;
 +              ex->ee_len = cex->ec_len;
 +              ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
 +                        (unsigned long) block,
@@ -1624,7 +1628,7 @@ Index: linux-stage/fs/ext3/extents.c
 +
 +              if (num == 0) {
 +                      /* this extent is removed entirely mark slot unused */
-+                      ex->ee_start = 0;
++                      ex->ee_start = ex->ee_start_hi = 0;
 +                      eh->eh_entries--;
 +                      fu = ex;
 +              }
@@ -1646,7 +1650,7 @@ Index: linux-stage/fs/ext3/extents.c
 +              while (lu < le) {
 +                      if (lu->ee_start) {
 +                              *fu = *lu;
-+                              lu->ee_start = 0;
++                              lu->ee_start = lu->ee_start_hi = 0;
 +                              fu++;
 +                      }
 +                      lu++;
@@ -2001,6 +2005,7 @@ Index: linux-stage/fs/ext3/extents.c
 +              /* allocate new block for the extent */
 +              goal = ext3_ext_find_goal(inode, path, ex->ee_block);
 +              ex->ee_start = ext3_new_block(handle, inode, goal, err);
++              ex->ee_start_hi = 0;
 +              if (ex->ee_start == 0) {
 +                      /* error occured: restore old extent */
 +                      ex->ee_start = newblock;
@@ -2116,6 +2121,7 @@ Index: linux-stage/fs/ext3/extents.c
 +      /* try to insert new extent into found leaf and return */
 +      newex.ee_block = iblock;
 +      newex.ee_start = newblock;
++      newex.ee_start_hi = 0;
 +      newex.ee_len = 1;
 +      err = ext3_ext_insert_extent(handle, &tree, path, &newex);
 +      if (err)
index 913bbc7..637da54 100644 (file)
@@ -338,7 +338,7 @@ static inline int fsfilt_statfs(struct obd_device *obd, struct super_block *sb,
 
         CDEBUG(D_SUPER, "osfs "CFS_TIME_T", max_age "CFS_TIME_T"\n", 
                 obd->obd_osfs_age, max_age);
-        if (cfs_time_before(obd->obd_osfs_age, max_age)) {
+        if (time_before_64(obd->obd_osfs_age, max_age)) {
                 rc = obd->obd_fsops->fs_statfs(sb, &obd->obd_osfs);
                 if (rc == 0) /* N.B. statfs can't really fail */
                         obd->obd_osfs_age = get_jiffies_64();
index c13de30..464f4c0 100644 (file)
@@ -689,6 +689,14 @@ obd_lvfs_fid2dentry(struct obd_export *exp, __u64 id_ino, __u32 gen, __u64 gr)
 #define time_before(t1, t2) ((long)t2 - (long)t1 > 0)
 #endif
 
+#ifndef time_before_64
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#define time_before_64(t1, t2) ((__s64)t2 - (__s64)t1 > 0)
+#else
+#define time_before_64 time_before
+#endif
+#endif
+
 /* @max_age is the oldest time in jiffies that we accept using a cached data.
  * If the cache is older than @max_age we will get a new value from the
  * target.  Use a value of "cfs_time_current() + HZ" to guarantee freshness. */
index 0419861..6841cd4 100644 (file)
@@ -37,6 +37,7 @@ extern unsigned int ldlm_timeout;
 extern unsigned int obd_health_check_timeout;
 extern char obd_lustre_upcall[128];
 extern cfs_waitq_t obd_race_waitq;
+extern int obd_race_state;
 
 #define OBD_FAIL_MDS                     0x100
 #define OBD_FAIL_MDS_HANDLE_UNPACK       0x101
@@ -221,8 +222,8 @@ do {                                                                         \
  * first thread that calls this with a matching fail_loc is put to
  * sleep. The next thread that calls with the same fail_loc wakes up
  * the first and continues. */
-#define OBD_RACE(id)                                            \
-do {                                                            \
+#define OBD_RACE(id)                                                           \
+do {                                                                           \
         if  (OBD_FAIL_CHECK_ONCE(id)) {                         \
                 CERROR("obd_race id %x sleeping\n", (id));      \
                 OBD_SLEEP_ON(&obd_race_waitq);        \
index 8f4c675..e68f87b 100644 (file)
@@ -2,7 +2,7 @@ Index: linux-2.4.21-rhel/fs/ext3/extents.c
 ===================================================================
 --- linux-2.4.21-rhel.orig/fs/ext3/extents.c   2005-03-02 22:42:20.659360368 +0300
 +++ linux-2.4.21-rhel/fs/ext3/extents.c        2005-03-04 02:34:52.000000000 +0300
-@@ -0,0 +1,2318 @@
+@@ -0,0 +1,2324 @@
 +/*
 + * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -557,6 +557,7 @@ Index: linux-2.4.21-rhel/fs/ext3/extents.c
 +
 +      ix->ei_block = logical;
 +      ix->ei_leaf = ptr;
++      ix->ei_leaf_hi = ix->ei_unused = 0;
 +      curp->p_hdr->eh_entries++;
 +
 +      EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
@@ -719,6 +720,7 @@ Index: linux-2.4.21-rhel/fs/ext3/extents.c
 +              fidx = EXT_FIRST_INDEX(neh);
 +              fidx->ei_block = border;
 +              fidx->ei_leaf = oldblock;
++              fidx->ei_leaf_hi = fidx->ei_unused = 0;
 +
 +              ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
 +                        i, newblock, border, oldblock);
@@ -852,6 +854,7 @@ Index: linux-2.4.21-rhel/fs/ext3/extents.c
 +      /* FIXME: it works, but actually path[0] can be index */
 +      curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
 +      curp->p_idx->ei_leaf = newblock;
++      curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
 +
 +      neh = EXT_ROOT_HDR(tree);
 +      fidx = EXT_FIRST_INDEX(neh);
@@ -1400,6 +1403,7 @@ Index: linux-2.4.21-rhel/fs/ext3/extents.c
 +      if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
 +              ex->ee_block = cex->ec_block;
 +              ex->ee_start = cex->ec_start;
++              ex->ee_start_hi = 0;
 +              ex->ee_len = cex->ec_len;
 +              ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
 +                        (unsigned long) block,
@@ -1621,7 +1625,7 @@ Index: linux-2.4.21-rhel/fs/ext3/extents.c
 +
 +              if (num == 0) {
 +                      /* this extent is removed entirely mark slot unused */
-+                      ex->ee_start = 0;
++                      ex->ee_start = ex->ee_start_hi = 0;
 +                      eh->eh_entries--;
 +                      fu = ex;
 +              }
@@ -1643,7 +1647,7 @@ Index: linux-2.4.21-rhel/fs/ext3/extents.c
 +              while (lu < le) {
 +                      if (lu->ee_start) {
 +                              *fu = *lu;
-+                              lu->ee_start = 0;
++                              lu->ee_start = lu->ee_start_hi = 0;
 +                              fu++;
 +                      }
 +                      lu++;
@@ -1969,6 +1973,7 @@ Index: linux-2.4.21-rhel/fs/ext3/extents.c
 +              goal = ext3_ext_find_goal(inode, path, ex->ee_block);
 +              lock_kernel();
 +              ex->ee_start = ext3_new_block(handle, inode, goal, 0, 0, err);
++              ex->ee_start_hi = 0;
 +              unlock_kernel();
 +              if (ex->ee_start == 0) {
 +                      /* error occured: restore old extent */
@@ -2086,6 +2091,7 @@ Index: linux-2.4.21-rhel/fs/ext3/extents.c
 +      /* try to insert new extent into found leaf and return */
 +      newex.ee_block = iblock;
 +      newex.ee_start = newblock;
++      newex.ee_start_hi = 0;
 +      newex.ee_len = 1;
 +      err = ext3_ext_insert_extent(handle, &tree, path, &newex);
 +      if (err)
index 1031470..0eb2e61 100644 (file)
@@ -2,7 +2,7 @@ Index: linux-2.4.21-suse2/fs/ext3/extents.c
 ===================================================================
 --- linux-2.4.21-suse2.orig/fs/ext3/extents.c  2003-01-30 13:24:37.000000000 +0300
 +++ linux-2.4.21-suse2/fs/ext3/extents.c       2004-11-03 00:34:45.404241880 +0300
-@@ -0,0 +1,2309 @@
+@@ -0,0 +1,2315 @@
 +/*
 + * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -557,6 +557,7 @@ Index: linux-2.4.21-suse2/fs/ext3/extents.c
 +
 +      ix->ei_block = logical;
 +      ix->ei_leaf = ptr;
++      ix->ei_leaf_hi = ix->ei_unused = 0;
 +      curp->p_hdr->eh_entries++;
 +
 +      EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
@@ -719,6 +720,7 @@ Index: linux-2.4.21-suse2/fs/ext3/extents.c
 +              fidx = EXT_FIRST_INDEX(neh);
 +              fidx->ei_block = border;
 +              fidx->ei_leaf = oldblock;
++              fidx->ei_leaf_hi = fidx->ei_unused = 0;
 +
 +              ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
 +                        i, newblock, border, oldblock);
@@ -852,6 +854,7 @@ Index: linux-2.4.21-suse2/fs/ext3/extents.c
 +      /* FIXME: it works, but actually path[0] can be index */
 +      curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
 +      curp->p_idx->ei_leaf = newblock;
++      curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
 +
 +      neh = EXT_ROOT_HDR(tree);
 +      fidx = EXT_FIRST_INDEX(neh);
@@ -1400,6 +1403,7 @@ Index: linux-2.4.21-suse2/fs/ext3/extents.c
 +      if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
 +              ex->ee_block = cex->ec_block;
 +              ex->ee_start = cex->ec_start;
++              ex->ee_start_hi = 0;
 +              ex->ee_len = cex->ec_len;
 +              ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
 +                        (unsigned long) block,
@@ -1621,7 +1625,7 @@ Index: linux-2.4.21-suse2/fs/ext3/extents.c
 +
 +              if (num == 0) {
 +                      /* this extent is removed entirely mark slot unused */
-+                      ex->ee_start = 0;
++                      ex->ee_start = ex->ee_start_hi = 0;
 +                      eh->eh_entries--;
 +                      fu = ex;
 +              }
@@ -1643,7 +1647,7 @@ Index: linux-2.4.21-suse2/fs/ext3/extents.c
 +              while (lu < le) {
 +                      if (lu->ee_start) {
 +                              *fu = *lu;
-+                              lu->ee_start = 0;
++                              lu->ee_start = lu->ee_start_hi = 0;
 +                              fu++;
 +                      }
 +                      lu++;
@@ -1969,6 +1973,7 @@ Index: linux-2.4.21-suse2/fs/ext3/extents.c
 +              goal = ext3_ext_find_goal(inode, path, ex->ee_block);
 +              lock_kernel();
 +              ex->ee_start = ext3_new_block(handle, inode, goal, 0, 0, err);
++              ex->ee_start_hi = 0;
 +              unlock_kernel();
 +              if (ex->ee_start == 0) {
 +                      /* error occured: restore old extent */
@@ -2086,6 +2091,7 @@ Index: linux-2.4.21-suse2/fs/ext3/extents.c
 +      /* try to insert new extent into found leaf and return */
 +      newex.ee_block = iblock;
 +      newex.ee_start = newblock;
++      newex.ee_start_hi = 0;
 +      newex.ee_len = 1;
 +      err = ext3_ext_insert_extent(handle, &tree, path, &newex);
 +      if (err)
index 9ee2417..568d229 100644 (file)
@@ -2,7 +2,7 @@ Index: linux-2.4.24/fs/ext3/extents.c
 ===================================================================
 --- linux-2.4.24.orig/fs/ext3/extents.c        2003-01-30 13:24:37.000000000 +0300
 +++ linux-2.4.24/fs/ext3/extents.c     2004-11-03 00:36:44.894076664 +0300
-@@ -0,0 +1,2308 @@
+@@ -0,0 +1,2314 @@
 +/*
 + * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -556,6 +556,7 @@ Index: linux-2.4.24/fs/ext3/extents.c
 +
 +      ix->ei_block = logical;
 +      ix->ei_leaf = ptr;
++      ix->ei_leaf_hi = ix->ei_unused = 0;
 +      curp->p_hdr->eh_entries++;
 +
 +      EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
@@ -718,6 +719,7 @@ Index: linux-2.4.24/fs/ext3/extents.c
 +              fidx = EXT_FIRST_INDEX(neh);
 +              fidx->ei_block = border;
 +              fidx->ei_leaf = oldblock;
++              fidx->ei_leaf_hi = fidx->ei_unused = 0;
 +
 +              ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
 +                        i, newblock, border, oldblock);
@@ -851,6 +853,7 @@ Index: linux-2.4.24/fs/ext3/extents.c
 +      /* FIXME: it works, but actually path[0] can be index */
 +      curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
 +      curp->p_idx->ei_leaf = newblock;
++      curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
 +
 +      neh = EXT_ROOT_HDR(tree);
 +      fidx = EXT_FIRST_INDEX(neh);
@@ -1399,6 +1402,7 @@ Index: linux-2.4.24/fs/ext3/extents.c
 +      if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
 +              ex->ee_block = cex->ec_block;
 +              ex->ee_start = cex->ec_start;
++              ex->ee_start_hi = 0;
 +              ex->ee_len = cex->ec_len;
 +              ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
 +                        (unsigned long) block,
@@ -1620,7 +1624,7 @@ Index: linux-2.4.24/fs/ext3/extents.c
 +
 +              if (num == 0) {
 +                      /* this extent is removed entirely mark slot unused */
-+                      ex->ee_start = 0;
++                      ex->ee_start = ex->ee_start_hi = 0;
 +                      eh->eh_entries--;
 +                      fu = ex;
 +              }
@@ -1642,7 +1646,7 @@ Index: linux-2.4.24/fs/ext3/extents.c
 +              while (lu < le) {
 +                      if (lu->ee_start) {
 +                              *fu = *lu;
-+                              lu->ee_start = 0;
++                              lu->ee_start = lu->ee_start_hi = 0;
 +                              fu++;
 +                      }
 +                      lu++;
@@ -1968,6 +1972,7 @@ Index: linux-2.4.24/fs/ext3/extents.c
 +              goal = ext3_ext_find_goal(inode, path, ex->ee_block);
 +              lock_kernel();
 +              ex->ee_start = ext3_new_block(handle, inode, goal, 0, 0, err);
++              ex->ee_start_hi = 0;
 +              unlock_kernel();
 +              if (ex->ee_start == 0) {
 +                      /* error occured: restore old extent */
@@ -2085,6 +2090,7 @@ Index: linux-2.4.24/fs/ext3/extents.c
 +      /* try to insert new extent into found leaf and return */
 +      newex.ee_block = iblock;
 +      newex.ee_start = newblock;
++      newex.ee_start_hi = 0;
 +      newex.ee_len = 1;
 +      err = ext3_ext_insert_extent(handle, &tree, path, &newex);
 +      if (err)
index 2c65544..68dacb6 100644 (file)
@@ -2,7 +2,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 ===================================================================
 --- linux-2.6.12-rc6.orig/fs/ext3/extents.c    2005-06-14 16:31:25.756503133 +0200
 +++ linux-2.6.12-rc6/fs/ext3/extents.c 2005-06-14 16:31:25.836581257 +0200
-@@ -0,0 +1,2353 @@
+@@ -0,0 +1,2359 @@
 +/*
 + * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -560,6 +560,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +
 +      ix->ei_block = logical;
 +      ix->ei_leaf = ptr;
++      ix->ei_leaf_hi = ix->ei_unused = 0;
 +      curp->p_hdr->eh_entries++;
 +
 +      EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
@@ -722,6 +723,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +              fidx = EXT_FIRST_INDEX(neh);
 +              fidx->ei_block = border;
 +              fidx->ei_leaf = oldblock;
++              fidx->ei_leaf_hi = fidx->ei_unused = 0;
 +
 +              ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
 +                        i, newblock, border, oldblock);
@@ -855,6 +857,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +      /* FIXME: it works, but actually path[0] can be index */
 +      curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
 +      curp->p_idx->ei_leaf = newblock;
++      curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
 +
 +      neh = EXT_ROOT_HDR(tree);
 +      fidx = EXT_FIRST_INDEX(neh);
@@ -1403,6 +1406,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +      if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
 +              ex->ee_block = cex->ec_block;
 +              ex->ee_start = cex->ec_start;
++              ex->ee_start_hi = 0;
 +              ex->ee_len = cex->ec_len;
 +              ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
 +                        (unsigned long) block,
@@ -1624,7 +1628,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +
 +              if (num == 0) {
 +                      /* this extent is removed entirely mark slot unused */
-+                      ex->ee_start = 0;
++                      ex->ee_start = ex->ee_start_hi = 0;
 +                      eh->eh_entries--;
 +                      fu = ex;
 +              }
@@ -1646,7 +1650,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +              while (lu < le) {
 +                      if (lu->ee_start) {
 +                              *fu = *lu;
-+                              lu->ee_start = 0;
++                              lu->ee_start = lu->ee_start_hi = 0;
 +                              fu++;
 +                      }
 +                      lu++;
@@ -2001,6 +2005,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +              /* allocate new block for the extent */
 +              goal = ext3_ext_find_goal(inode, path, ex->ee_block);
 +              ex->ee_start = ext3_new_block(handle, inode, goal, err);
++              ex->ee_start_hi = 0;
 +              if (ex->ee_start == 0) {
 +                      /* error occured: restore old extent */
 +                      ex->ee_start = newblock;
@@ -2116,6 +2121,7 @@ Index: linux-2.6.12-rc6/fs/ext3/extents.c
 +      /* try to insert new extent into found leaf and return */
 +      newex.ee_block = iblock;
 +      newex.ee_start = newblock;
++      newex.ee_start_hi = 0;
 +      newex.ee_len = 1;
 +      err = ext3_ext_insert_extent(handle, &tree, path, &newex);
 +      if (err)
index be0642f..a99c695 100644 (file)
@@ -3,7 +3,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 ===================================================================
 --- linux-2.6.5-sles9.orig/fs/ext3/extents.c   2005-02-17 22:07:57.023609040 +0300
 +++ linux-2.6.5-sles9/fs/ext3/extents.c        2005-02-23 01:02:37.396435640 +0300
-@@ -0,0 +1,2355 @@
+@@ -0,0 +1,2361 @@
 +/*
 + * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -561,6 +561,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +
 +      ix->ei_block = logical;
 +      ix->ei_leaf = ptr;
++      ix->ei_leaf_hi = ix->ei_unused = 0;
 +      curp->p_hdr->eh_entries++;
 +
 +      EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
@@ -723,6 +724,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +              fidx = EXT_FIRST_INDEX(neh);
 +              fidx->ei_block = border;
 +              fidx->ei_leaf = oldblock;
++              fidx->ei_leaf_hi = fidx->ei_unused = 0;
 +
 +              ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
 +                        i, newblock, border, oldblock);
@@ -856,6 +858,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +      /* FIXME: it works, but actually path[0] can be index */
 +      curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
 +      curp->p_idx->ei_leaf = newblock;
++      curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
 +
 +      neh = EXT_ROOT_HDR(tree);
 +      fidx = EXT_FIRST_INDEX(neh);
@@ -1404,6 +1407,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +      if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
 +              ex->ee_block = cex->ec_block;
 +              ex->ee_start = cex->ec_start;
++              ex->ee_start_hi = 0;
 +              ex->ee_len = cex->ec_len;
 +              ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
 +                        (unsigned long) block,
@@ -1625,7 +1629,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +
 +              if (num == 0) {
 +                      /* this extent is removed entirely mark slot unused */
-+                      ex->ee_start = 0;
++                      ex->ee_start = ex->ee_start_hi = 0;
 +                      eh->eh_entries--;
 +                      fu = ex;
 +              }
@@ -1647,7 +1651,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +              while (lu < le) {
 +                      if (lu->ee_start) {
 +                              *fu = *lu;
-+                              lu->ee_start = 0;
++                              lu->ee_start = lu->ee_start_hi = 0;
 +                              fu++;
 +                      }
 +                      lu++;
@@ -2002,6 +2006,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +              /* allocate new block for the extent */
 +              goal = ext3_ext_find_goal(inode, path, ex->ee_block);
 +              ex->ee_start = ext3_new_block(handle, inode, goal, err);
++              ex->ee_start_hi = 0;
 +              if (ex->ee_start == 0) {
 +                      /* error occured: restore old extent */
 +                      ex->ee_start = newblock;
@@ -2117,6 +2122,7 @@ Index: linux-2.6.5-sles9/fs/ext3/extents.c
 +      /* try to insert new extent into found leaf and return */
 +      newex.ee_block = iblock;
 +      newex.ee_start = newblock;
++      newex.ee_start_hi = 0;
 +      newex.ee_len = 1;
 +      err = ext3_ext_insert_extent(handle, &tree, path, &newex);
 +      if (err)
index def228e..314dd58 100644 (file)
@@ -2,7 +2,7 @@ Index: linux-stage/fs/ext3/extents.c
 ===================================================================
 --- linux-stage.orig/fs/ext3/extents.c 2005-02-25 15:33:48.890198160 +0200
 +++ linux-stage/fs/ext3/extents.c      2005-02-25 15:33:48.917194056 +0200
-@@ -0,0 +1,2353 @@
+@@ -0,0 +1,2359 @@
 +/*
 + * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -560,6 +560,7 @@ Index: linux-stage/fs/ext3/extents.c
 +
 +      ix->ei_block = logical;
 +      ix->ei_leaf = ptr;
++      ix->ei_leaf_hi = ix->ei_unused = 0;
 +      curp->p_hdr->eh_entries++;
 +
 +      EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
@@ -722,6 +723,7 @@ Index: linux-stage/fs/ext3/extents.c
 +              fidx = EXT_FIRST_INDEX(neh);
 +              fidx->ei_block = border;
 +              fidx->ei_leaf = oldblock;
++              fidx->ei_leaf_hi = fidx->ei_unused = 0;
 +
 +              ext_debug(tree, "int.index at %d (block %lu): %lu -> %lu\n",
 +                        i, newblock, border, oldblock);
@@ -855,6 +857,7 @@ Index: linux-stage/fs/ext3/extents.c
 +      /* FIXME: it works, but actually path[0] can be index */
 +      curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
 +      curp->p_idx->ei_leaf = newblock;
++      curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
 +
 +      neh = EXT_ROOT_HDR(tree);
 +      fidx = EXT_FIRST_INDEX(neh);
@@ -1403,6 +1406,7 @@ Index: linux-stage/fs/ext3/extents.c
 +      if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
 +              ex->ee_block = cex->ec_block;
 +              ex->ee_start = cex->ec_start;
++              ex->ee_start_hi = 0;
 +              ex->ee_len = cex->ec_len;
 +              ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
 +                        (unsigned long) block,
@@ -1624,7 +1628,7 @@ Index: linux-stage/fs/ext3/extents.c
 +
 +              if (num == 0) {
 +                      /* this extent is removed entirely mark slot unused */
-+                      ex->ee_start = 0;
++                      ex->ee_start = ex->ee_start_hi = 0;
 +                      eh->eh_entries--;
 +                      fu = ex;
 +              }
@@ -1646,7 +1650,7 @@ Index: linux-stage/fs/ext3/extents.c
 +              while (lu < le) {
 +                      if (lu->ee_start) {
 +                              *fu = *lu;
-+                              lu->ee_start = 0;
++                              lu->ee_start = lu->ee_start_hi = 0;
 +                              fu++;
 +                      }
 +                      lu++;
@@ -2001,6 +2005,7 @@ Index: linux-stage/fs/ext3/extents.c
 +              /* allocate new block for the extent */
 +              goal = ext3_ext_find_goal(inode, path, ex->ee_block);
 +              ex->ee_start = ext3_new_block(handle, inode, goal, err);
++              ex->ee_start_hi = 0;
 +              if (ex->ee_start == 0) {
 +                      /* error occured: restore old extent */
 +                      ex->ee_start = newblock;
@@ -2116,6 +2121,7 @@ Index: linux-stage/fs/ext3/extents.c
 +      /* try to insert new extent into found leaf and return */
 +      newex.ee_block = iblock;
 +      newex.ee_start = newblock;
++      newex.ee_start_hi = 0;
 +      newex.ee_len = 1;
 +      err = ext3_ext_insert_extent(handle, &tree, path, &newex);
 +      if (err)
index 1faf3ec..e89c11c 100644 (file)
@@ -37,7 +37,7 @@ Index: linux-2.6.9/drivers/md/raid5.c
 +      sectors = bi->bi_size >> 9;
 +
 +repeat:
-+      stripe = block * sectors_per_block / data_disks;
++      stripe = block * (sectors_per_block / data_disks);
 +      b_sector = stripe * data_disks;
 +      /* iterate through all stripes in this block,
 +       * where block is a set of internal stripes
index a2bf615..65b01b7 100644 (file)
@@ -234,6 +234,12 @@ int llu_glimpse_size(struct inode *inode)
 
         CDEBUG(D_DLMTRACE, "Glimpsing inode %llu\n", (long long)st->st_ino);
 
+        if (!lli->lli_smd) {
+                CDEBUG(D_DLMTRACE, "No objects for inode %llu\n", 
+                       (long long)st->st_ino);
+                RETURN(0);
+        }
+
         einfo.ei_type = LDLM_EXTENT;
         einfo.ei_mode = LCK_PR;
         einfo.ei_flags = LDLM_FL_HAS_INTENT;
index 897eaae..9cc6806 100644 (file)
@@ -226,10 +226,18 @@ int t8(char *name)
         ENTRY("chmod");
         snprintf(path, MAX_PATH_LENGTH, "%s/test_t8", lustre_path);
 
+        /* Check file. */
         t_touch(path);
         t_chmod_raw(path, 0700);
         t_check_stat(path, NULL);
         t_unlink(path);
+
+        /* Check dir. */
+        t_mkdir(path);
+        t_chmod_raw(path, 0700);
+        t_check_stat(path, NULL);
+        t_rmdir(path);
+
         LEAVE();
 }
 
index 30fe245..1d87137 100644 (file)
@@ -444,7 +444,8 @@ static int mds_disconnect(struct obd_export *exp)
 
         /* Disconnect early so that clients can't keep using export */
         rc = class_disconnect(exp);
-        ldlm_cancel_locks_for_export(exp);
+        if (exp->exp_obd->obd_namespace != NULL)
+                ldlm_cancel_locks_for_export(exp);
 
         /* complete all outstanding replies */
         spin_lock(&exp->exp_lock);
index 6cc4013..1f30212 100644 (file)
@@ -68,6 +68,7 @@ unsigned int obd_health_check_timeout = 120; /* seconds */
 char obd_lustre_upcall[128] = "DEFAULT"; /* or NONE or /full/path/to/upcall  */
 
 cfs_waitq_t obd_race_waitq;
+int obd_race_state;
 
 #ifdef __KERNEL__
 unsigned int obd_print_fail_loc(void)
@@ -380,6 +381,7 @@ EXPORT_SYMBOL(obd_devs);
 EXPORT_SYMBOL(obd_fail_loc);
 EXPORT_SYMBOL(obd_print_fail_loc);
 EXPORT_SYMBOL(obd_race_waitq);
+EXPORT_SYMBOL(obd_race_state);
 EXPORT_SYMBOL(obd_dump_on_timeout);
 EXPORT_SYMBOL(obd_timeout);
 EXPORT_SYMBOL(ldlm_timeout);
index 5256ae7..e09874e 100644 (file)
@@ -230,7 +230,7 @@ int lprocfs_rd_blksize(char *page, char **start, off_t off, int count,
                        int *eof, void *data)
 {
         struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, jiffies - HZ);
+        int rc = obd_statfs(data, &osfs, get_jiffies_64() - HZ);
         if (!rc) {
                 *eof = 1;
                 rc = snprintf(page, count, "%u\n", osfs.os_bsize);
@@ -242,7 +242,7 @@ int lprocfs_rd_kbytestotal(char *page, char **start, off_t off, int count,
                            int *eof, void *data)
 {
         struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, jiffies - HZ);
+        int rc = obd_statfs(data, &osfs, get_jiffies_64() - HZ);
         if (!rc) {
                 __u32 blk_size = osfs.os_bsize >> 10;
                 __u64 result = osfs.os_blocks;
@@ -260,7 +260,7 @@ int lprocfs_rd_kbytesfree(char *page, char **start, off_t off, int count,
                           int *eof, void *data)
 {
         struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, jiffies - HZ);
+        int rc = obd_statfs(data, &osfs, get_jiffies_64() - HZ);
         if (!rc) {
                 __u32 blk_size = osfs.os_bsize >> 10;
                 __u64 result = osfs.os_bfree;
@@ -278,7 +278,7 @@ int lprocfs_rd_kbytesavail(char *page, char **start, off_t off, int count,
                            int *eof, void *data)
 {
         struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, jiffies - HZ);
+        int rc = obd_statfs(data, &osfs, get_jiffies_64() - HZ);
         if (!rc) {
                 __u32 blk_size = osfs.os_bsize >> 10;
                 __u64 result = osfs.os_bavail;
@@ -296,7 +296,7 @@ int lprocfs_rd_filestotal(char *page, char **start, off_t off, int count,
                           int *eof, void *data)
 {
         struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, jiffies - HZ);
+        int rc = obd_statfs(data, &osfs, get_jiffies_64() - HZ);
         if (!rc) {
                 *eof = 1;
                 rc = snprintf(page, count, LPU64"\n", osfs.os_files);
@@ -309,7 +309,7 @@ int lprocfs_rd_filesfree(char *page, char **start, off_t off, int count,
                          int *eof, void *data)
 {
         struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, jiffies - HZ);
+        int rc = obd_statfs(data, &osfs, get_jiffies_64() - HZ);
         if (!rc) {
                 *eof = 1;
                 rc = snprintf(page, count, LPU64"\n", osfs.os_ffree);
index 91a02b9..bc74412 100644 (file)
@@ -2195,7 +2195,8 @@ static int filter_disconnect(struct obd_export *exp)
 
         /* Disconnect early so that clients can't keep using export */
         rc = class_disconnect(exp);
-        ldlm_cancel_locks_for_export(exp);
+        if (exp->exp_obd->obd_namespace != NULL)
+                ldlm_cancel_locks_for_export(exp);
 
         fsfilt_sync(obd, obd->u.obt.obt_sb);
 
index 1d82661..66d4f3f 100644 (file)
@@ -160,7 +160,7 @@ obd_size filter_grant_space_left(struct obd_export *exp)
 
         LASSERT_SPIN_LOCKED(&obd->obd_osfs_lock);
 
-        if (cfs_time_before(obd->obd_osfs_age, get_jiffies_64() - HZ)) {
+        if (time_before_64(obd->obd_osfs_age, get_jiffies_64() - HZ)) {
 restat:
                 rc = fsfilt_statfs(obd, obd->u.obt.obt_sb, get_jiffies_64() + HZ);
                 if (rc) /* N.B. statfs can't really fail */
index acabe21..1c40ea2 100755 (executable)
@@ -137,7 +137,7 @@ test_6() {
     rm -f $f
     sync && sleep 2 && sync    # wait for delete thread
     before=`kbytesfree`
-    dd if=/dev/urandom bs=4096 count=1280 of=$f
+    dd if=/dev/urandom bs=4096 count=1280 of=$f || return 28
     lfs getstripe $f
 #define OBD_FAIL_MDS_REINT_NET_REP       0x119
     do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
index c84d6d7..5d9f179 100644 (file)
@@ -601,20 +601,18 @@ test_25() {
 run_test 25 "change ACL on one mountpoint be seen on another ==="
 
 test_26a() {
-        rm -f $DIR1/f26a
         utime $DIR1/f26a -s $DIR2/f26a || error
 }
 run_test 26a "allow mtime to get older"
 
 test_26b() {
-        rm -f $DIR1/f26b
-        touch $DIR1/f26b
+        touch $DIR1/$tfile
         sleep 1
-        echo "aaa" >> $DIR1/f26b
+        echo "aaa" >> $DIR1/$tfile
         sleep 1
-        chmod a+x $DIR2/f26b
-        mt1=`stat $DIR1/f26b | sed 's/\./ /g' | awk ' /Modify/ { print $5 }'`
-        mt2=`stat $DIR2/f26b | sed 's/\./ /g' | awk ' /Modify/ { print $5 }'`
+        chmod a+x $DIR2/$tfile
+        mt1=`stat -c %Y $DIR1/$tfile`
+        mt2=`stat -c %Y $DIR2/$tfile`
         
         if [ x"$mt1" != x"$mt2" ]; then 
                 error "not equal mtime, client1: "$mt1", client2: "$mt2"."