]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/ext4/ialloc.c
ext4: Add fallback for find_group_flex
[net-next-2.6.git] / fs / ext4 / ialloc.c
index 4fb86a0061d033db005eb485d92263ede5120664..f18a919be70becf286c74364345a464e4d6e75e6 100644 (file)
@@ -715,6 +715,13 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode)
 
        if (sbi->s_log_groups_per_flex) {
                ret2 = find_group_flex(sb, dir, &group);
+               if (ret2 == -1) {
+                       ret2 = find_group_other(sb, dir, &group);
+                       if (ret2 == 0 && printk_ratelimit())
+                               printk(KERN_NOTICE "ext4: find_group_flex "
+                                      "failed, fallback succeeded dir %lu\n",
+                                      dir->i_ino);
+               }
                goto got_group;
        }