Whamcloud - gitweb
b=22769 improve error message for dx_probe
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext3_data_in_dirent.patch
index 871b441..d06240c 100644 (file)
@@ -83,10 +83,30 @@ Index: b/fs/ext3/namei.c
 +      if (dx_get_limit(entries) != dx_root_limit(dir->i_sb->s_blocksize,
 +                                              (struct ext3_dir_entry_2*)bh->b_data,
 +                                              info->info_length)) {
-               ext3_warning(dir->i_sb, __FUNCTION__,
-                            "dx entry: limit != root limit");
-               brelse(bh);
-@@ -583,7 +597,7 @@ static int htree_dirblock_to_tree(struct
+               ext3_warning(dir->i_sb, __FUNCTION__,
+                            "dx entry: limit != root limit");
+               brelse(bh);
+@@ -468,14 +481,17 @@ dx_probe(struct dentry *dentry, struct i
+               if (!indirect--) return frame;
+               if (!(bh = ext3_bread (NULL,dir, dx_get_block(at), 0, err)))
+                       goto fail2;
+-              at = entries = ((struct dx_node *) bh->b_data)->entries;
++              entries = ((struct dx_node *) bh->b_data)->entries;
+               if (dx_get_limit(entries) != dx_node_limit (dir)) {
+                       ext3_warning(dir->i_sb, __FUNCTION__,
+-                                   "dx entry: limit != node limit");
++                                     "block %u(%lu): limit %u != node limit %u",
++                                     dx_get_block(at), (long)bh->b_blocknr,
++                                     dx_get_limit(entries), dx_node_limit(dir));
+                       brelse(bh);
+                       *err = ERR_BAD_DX_DIR;
+                       goto fail2;
+               }
++              at = entries;
+               frame++;
+               frame->bh = NULL;
+       }
+@@ -608,7 +624,7 @@ static int htree_dirblock_to_tree(struct
        de = (struct ext3_dir_entry_2 *) bh->b_data;
        top = (struct ext3_dir_entry_2 *) ((char *) de +
                                           dir->i_sb->s_blocksize -