From 884ec854c102075e1fab8ef5895d6626fcdb316b Mon Sep 17 00:00:00 2001 From: scjody Date: Tue, 11 Jul 2006 16:18:10 +0000 Subject: [PATCH] Merge b1_5 from b1_4 (20060708_2140) --- ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch | 12 +++++++++--- ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch | 12 +++++++++--- .../kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch | 12 +++++++++--- lustre/include/linux/lustre_fsfilt.h | 2 +- lustre/include/obd_class.h | 8 ++++++++ lustre/include/obd_support.h | 5 +++-- .../kernel_patches/patches/ext3-extents-2.4.21-chaos.patch | 12 +++++++++--- .../kernel_patches/patches/ext3-extents-2.4.21-suse2.patch | 12 +++++++++--- lustre/kernel_patches/patches/ext3-extents-2.4.24.patch | 12 +++++++++--- lustre/kernel_patches/patches/ext3-extents-2.6.12.patch | 12 +++++++++--- lustre/kernel_patches/patches/ext3-extents-2.6.5.patch | 12 +++++++++--- lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch | 12 +++++++++--- .../patches/raid5-stripe-by-stripe-handling.patch | 2 +- lustre/liblustre/rw.c | 6 ++++++ lustre/liblustre/tests/sanity.c | 8 ++++++++ lustre/mds/handler.c | 3 ++- lustre/obdclass/class_obd.c | 2 ++ lustre/obdclass/lprocfs_status.c | 12 ++++++------ lustre/obdfilter/filter.c | 3 ++- lustre/obdfilter/filter_io.c | 2 +- lustre/tests/replay-ost-single.sh | 2 +- lustre/tests/sanityN.sh | 12 +++++------- 22 files changed, 127 insertions(+), 48 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch index 2c65544..68dacb6 100644 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch +++ b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch @@ -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 @@ -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) diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch index be0642f..a99c6952 100644 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch +++ b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch @@ -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 @@ -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) diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch index def228e..314dd58 100644 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch +++ b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch @@ -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 @@ -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) diff --git a/lustre/include/linux/lustre_fsfilt.h b/lustre/include/linux/lustre_fsfilt.h index 913bbc7..637da54 100644 --- a/lustre/include/linux/lustre_fsfilt.h +++ b/lustre/include/linux/lustre_fsfilt.h @@ -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(); diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index c13de30..464f4c0 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -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. */ diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index 0419861..6841cd4 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -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); \ diff --git a/lustre/kernel_patches/patches/ext3-extents-2.4.21-chaos.patch b/lustre/kernel_patches/patches/ext3-extents-2.4.21-chaos.patch index 8f4c675..e68f87b 100644 --- a/lustre/kernel_patches/patches/ext3-extents-2.4.21-chaos.patch +++ b/lustre/kernel_patches/patches/ext3-extents-2.4.21-chaos.patch @@ -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 @@ -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) diff --git a/lustre/kernel_patches/patches/ext3-extents-2.4.21-suse2.patch b/lustre/kernel_patches/patches/ext3-extents-2.4.21-suse2.patch index 1031470..0eb2e61 100644 --- a/lustre/kernel_patches/patches/ext3-extents-2.4.21-suse2.patch +++ b/lustre/kernel_patches/patches/ext3-extents-2.4.21-suse2.patch @@ -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 @@ -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) diff --git a/lustre/kernel_patches/patches/ext3-extents-2.4.24.patch b/lustre/kernel_patches/patches/ext3-extents-2.4.24.patch index 9ee2417..568d229 100644 --- a/lustre/kernel_patches/patches/ext3-extents-2.4.24.patch +++ b/lustre/kernel_patches/patches/ext3-extents-2.4.24.patch @@ -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 @@ -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) diff --git a/lustre/kernel_patches/patches/ext3-extents-2.6.12.patch b/lustre/kernel_patches/patches/ext3-extents-2.6.12.patch index 2c65544..68dacb6 100644 --- a/lustre/kernel_patches/patches/ext3-extents-2.6.12.patch +++ b/lustre/kernel_patches/patches/ext3-extents-2.6.12.patch @@ -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 @@ -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) diff --git a/lustre/kernel_patches/patches/ext3-extents-2.6.5.patch b/lustre/kernel_patches/patches/ext3-extents-2.6.5.patch index be0642f..a99c6952 100644 --- a/lustre/kernel_patches/patches/ext3-extents-2.6.5.patch +++ b/lustre/kernel_patches/patches/ext3-extents-2.6.5.patch @@ -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 @@ -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) diff --git a/lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch b/lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch index def228e..314dd58 100644 --- a/lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch +++ b/lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch @@ -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 @@ -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) diff --git a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch b/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch index 1faf3ec..e89c11c 100644 --- a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch +++ b/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch @@ -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 diff --git a/lustre/liblustre/rw.c b/lustre/liblustre/rw.c index a2bf615..65b01b7 100644 --- a/lustre/liblustre/rw.c +++ b/lustre/liblustre/rw.c @@ -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; diff --git a/lustre/liblustre/tests/sanity.c b/lustre/liblustre/tests/sanity.c index 897eaae..9cc6806 100644 --- a/lustre/liblustre/tests/sanity.c +++ b/lustre/liblustre/tests/sanity.c @@ -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(); } diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 30fe245..1d87137 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -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); diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index 6cc4013..1f30212 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -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); diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 5256ae7..e09874e 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -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); diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 91a02b9..bc74412 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -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); diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index 1d82661..66d4f3f 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -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 */ diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh index acabe21..1c40ea2 100755 --- a/lustre/tests/replay-ost-single.sh +++ b/lustre/tests/replay-ost-single.sh @@ -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" diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index c84d6d7..5d9f179 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -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"." -- 1.8.3.1