From b7bd99d6c97dae50e59f6ddbfe26e5dc83319531 Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 24 Oct 2006 13:21:19 +0000 Subject: [PATCH] iam: iam_it_collision(): release path before repeating lookup (fid to buffalo failure). --- .../patches/ext3-pdirops-2.6.9.patch | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/lustre/kernel_patches/patches/ext3-pdirops-2.6.9.patch b/lustre/kernel_patches/patches/ext3-pdirops-2.6.9.patch index 6c6f109..4f94c16 100644 --- a/lustre/kernel_patches/patches/ext3-pdirops-2.6.9.patch +++ b/lustre/kernel_patches/patches/ext3-pdirops-2.6.9.patch @@ -423,7 +423,7 @@ Index: iam/fs/ext3/namei.c * there's no point to read in the successive index pages. */ iam_get_ikey(path, p->at, (struct iam_ikey *)&bhash); -@@ -425,25 +624,89 @@ static int ext3_htree_advance(struct ino +@@ -425,25 +624,90 @@ static int ext3_htree_advance(struct ino * block so no check is necessary */ while (num_frames--) { @@ -506,6 +506,7 @@ Index: iam/fs/ext3/namei.c + break; + } + dx_unlock_array(object, lh); ++ iam_path_fini(path); + result = dx_lookup(path); + while (path->ip_frame->leaf != cursor) { + result = iam_index_advance(path); @@ -518,7 +519,7 @@ Index: iam/fs/ext3/namei.c } int ext3_htree_next_block(struct inode *dir, __u32 hash, -@@ -882,7 +1145,7 @@ static struct buffer_head * ext3_dx_find +@@ -882,7 +1146,7 @@ static struct buffer_head * ext3_dx_find sb = dir->i_sb; /* NFS may look up ".." - look at dx_root directory block */ if (namelen > 2 || name[0] != '.'||(name[1] != '.' && name[1] != '\0')){ @@ -527,7 +528,7 @@ Index: iam/fs/ext3/namei.c if (*err != 0) return NULL; } else { -@@ -1114,7 +1377,7 @@ struct ext3_dir_entry_2 *move_entries(st +@@ -1114,7 +1378,7 @@ struct ext3_dir_entry_2 *move_entries(st hash2 = map[split].hash; continued = hash2 == map[split - 1].hash; dxtrace(printk("Split block %i at %x, %i/%i\n", @@ -536,7 +537,7 @@ Index: iam/fs/ext3/namei.c /* Fancy dance to stay within two buffers */ de2 = dx_move_dirents(data1, data2, map + split, count - split); -@@ -1484,16 +1747,40 @@ static int shift_entries(struct iam_path +@@ -1484,16 +1748,40 @@ static int shift_entries(struct iam_path (char *) iam_entry_shift(path, entries, count1), count2 * iam_entry_size(path)); @@ -579,7 +580,7 @@ Index: iam/fs/ext3/namei.c { struct iam_entry *entries; /* old block contents */ -@@ -1501,6 +1788,8 @@ int split_index_node(handle_t *handle, s +@@ -1501,6 +1789,8 @@ int split_index_node(handle_t *handle, s struct iam_frame *frame, *safe; struct buffer_head *bh_new[DX_MAX_TREE_HEIGHT] = {0}; u32 newblock[DX_MAX_TREE_HEIGHT] = {0}; @@ -588,7 +589,7 @@ Index: iam/fs/ext3/namei.c struct inode *dir = iam_path_obj(path); struct iam_descr *descr; int nr_splet; -@@ -1523,12 +1812,14 @@ int split_index_node(handle_t *handle, s +@@ -1523,12 +1813,14 @@ int split_index_node(handle_t *handle, s * - first allocate all necessary blocks * * - insert pointers into them atomically. @@ -607,7 +608,7 @@ Index: iam/fs/ext3/namei.c dxtrace(printk("using %u of %u node entries\n", dx_get_count(entries), dx_get_limit(entries))); -@@ -1545,7 +1836,25 @@ int split_index_node(handle_t *handle, s +@@ -1545,7 +1837,25 @@ int split_index_node(handle_t *handle, s } safe = frame; @@ -634,7 +635,7 @@ Index: iam/fs/ext3/namei.c * transaction... */ for (frame = safe + 1, i = 0; i < nr_splet; ++i, ++frame) { bh_new[i] = ext3_append (handle, dir, &newblock[i], &err); -@@ -1553,6 +1862,11 @@ int split_index_node(handle_t *handle, s +@@ -1553,6 +1863,11 @@ int split_index_node(handle_t *handle, s descr->id_ops->id_node_init(path->ip_container, bh_new[i], 0) != 0) goto cleanup; @@ -646,7 +647,7 @@ Index: iam/fs/ext3/namei.c BUFFER_TRACE(frame->bh, "get_write_access"); err = ext3_journal_get_write_access(handle, frame->bh); if (err) -@@ -1602,9 +1916,11 @@ int split_index_node(handle_t *handle, s +@@ -1602,9 +1917,11 @@ int split_index_node(handle_t *handle, s dx_set_limit(entries2, dx_node_limit(path)); /* Set up root */ @@ -658,7 +659,7 @@ Index: iam/fs/ext3/namei.c /* Shift frames in the path */ memmove(frames + 2, frames + 1, -@@ -1635,6 +1951,7 @@ int split_index_node(handle_t *handle, s +@@ -1635,6 +1952,7 @@ int split_index_node(handle_t *handle, s idx - count + d); frame->entries = entries = entries2; swap(frame->bh, bh2); @@ -666,7 +667,7 @@ Index: iam/fs/ext3/namei.c bh_new[i] = bh2; parent->at = iam_entry_shift(path, parent->at, +1); -@@ -1662,6 +1979,8 @@ int split_index_node(handle_t *handle, s +@@ -1662,6 +1980,8 @@ int split_index_node(handle_t *handle, s dx_get_limit(path->ip_frame->entries)); } if (nr_splet > 0) { @@ -675,7 +676,7 @@ Index: iam/fs/ext3/namei.c /* * Log ->i_size modification. */ -@@ -1674,6 +1993,9 @@ journal_error: +@@ -1674,6 +1994,9 @@ journal_error: ext3_std_error(dir->i_sb, err); cleanup: @@ -685,7 +686,7 @@ Index: iam/fs/ext3/namei.c for (i = 0; i < ARRAY_SIZE(bh_new); ++i) { if (bh_new[i] != NULL) brelse(bh_new[i]); -@@ -1695,18 +2017,18 @@ static int ext3_dx_add_entry(handle_t *h +@@ -1695,18 +2018,18 @@ static int ext3_dx_add_entry(handle_t *h struct buffer_head * bh = NULL; struct inode *dir = dentry->d_parent->d_inode; struct ext3_dir_entry_2 *de; @@ -706,7 +707,7 @@ Index: iam/fs/ext3/namei.c isize = dir->i_size; err = param->id_ops->id_node_read(path->ip_container, -@@ -1726,7 +2048,7 @@ static int ext3_dx_add_entry(handle_t *h +@@ -1726,7 +2049,7 @@ static int ext3_dx_add_entry(handle_t *h goto cleanup; } @@ -715,7 +716,7 @@ Index: iam/fs/ext3/namei.c if (err) goto cleanup; -@@ -1742,6 +2064,7 @@ static int ext3_dx_add_entry(handle_t *h +@@ -1742,6 +2065,7 @@ static int ext3_dx_add_entry(handle_t *h journal_error: ext3_std_error(dir->i_sb, err); cleanup: -- 1.8.3.1