===================================================================
--- 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>
+
+ 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);
+ 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);
+ /* 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);
+ 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,
+
+ 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;
+ }
+ while (lu < le) {
+ if (lu->ee_start) {
+ *fu = *lu;
-+ lu->ee_start = 0;
++ lu->ee_start = lu->ee_start_hi = 0;
+ fu++;
+ }
+ lu++;
+ /* 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;
+ /* 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)
===================================================================
--- 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>
+
+ 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);
+ 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);
+ /* 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);
+ 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,
+
+ 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;
+ }
+ while (lu < le) {
+ if (lu->ee_start) {
+ *fu = *lu;
-+ lu->ee_start = 0;
++ lu->ee_start = lu->ee_start_hi = 0;
+ fu++;
+ }
+ lu++;
+ /* 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;
+ /* 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)
===================================================================
--- 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>
+
+ 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);
+ 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);
+ /* 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);
+ 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,
+
+ 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;
+ }
+ while (lu < le) {
+ if (lu->ee_start) {
+ *fu = *lu;
-+ lu->ee_start = 0;
++ lu->ee_start = lu->ee_start_hi = 0;
+ fu++;
+ }
+ lu++;
+ /* 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;
+ /* 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)
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();
#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. */
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
* 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); \
===================================================================
--- 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>
+
+ 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);
+ 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);
+ /* 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);
+ 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,
+
+ 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;
+ }
+ while (lu < le) {
+ if (lu->ee_start) {
+ *fu = *lu;
-+ lu->ee_start = 0;
++ lu->ee_start = lu->ee_start_hi = 0;
+ fu++;
+ }
+ lu++;
+ 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 */
+ /* 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)
===================================================================
--- 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>
+
+ 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);
+ 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);
+ /* 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);
+ 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,
+
+ 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;
+ }
+ while (lu < le) {
+ if (lu->ee_start) {
+ *fu = *lu;
-+ lu->ee_start = 0;
++ lu->ee_start = lu->ee_start_hi = 0;
+ fu++;
+ }
+ lu++;
+ 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 */
+ /* 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)
===================================================================
--- 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>
+
+ 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);
+ 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);
+ /* 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);
+ 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,
+
+ 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;
+ }
+ while (lu < le) {
+ if (lu->ee_start) {
+ *fu = *lu;
-+ lu->ee_start = 0;
++ lu->ee_start = lu->ee_start_hi = 0;
+ fu++;
+ }
+ lu++;
+ 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 */
+ /* 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)
===================================================================
--- 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>
+
+ 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);
+ 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);
+ /* 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);
+ 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,
+
+ 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;
+ }
+ while (lu < le) {
+ if (lu->ee_start) {
+ *fu = *lu;
-+ lu->ee_start = 0;
++ lu->ee_start = lu->ee_start_hi = 0;
+ fu++;
+ }
+ lu++;
+ /* 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;
+ /* 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)
===================================================================
--- 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>
+
+ 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);
+ 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);
+ /* 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);
+ 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,
+
+ 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;
+ }
+ while (lu < le) {
+ if (lu->ee_start) {
+ *fu = *lu;
-+ lu->ee_start = 0;
++ lu->ee_start = lu->ee_start_hi = 0;
+ fu++;
+ }
+ lu++;
+ /* 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;
+ /* 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)
===================================================================
--- 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>
+
+ 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);
+ 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);
+ /* 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);
+ 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,
+
+ 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;
+ }
+ while (lu < le) {
+ if (lu->ee_start) {
+ *fu = *lu;
-+ lu->ee_start = 0;
++ lu->ee_start = lu->ee_start_hi = 0;
+ fu++;
+ }
+ lu++;
+ /* 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;
+ /* 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)
+ 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
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;
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();
}
/* 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);
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)
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);
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);
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;
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;
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;
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);
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);
/* 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);
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 */
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"
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"."