linux/fs/ext4/ialloc.c
<<
>>
Prefs
   1/*
   2 *  linux/fs/ext4/ialloc.c
   3 *
   4 * Copyright (C) 1992, 1993, 1994, 1995
   5 * Remy Card (card@masi.ibp.fr)
   6 * Laboratoire MASI - Institut Blaise Pascal
   7 * Universite Pierre et Marie Curie (Paris VI)
   8 *
   9 *  BSD ufs-inspired inode and directory allocation by
  10 *  Stephen Tweedie (sct@redhat.com), 1993
  11 *  Big-endian to little-endian byte-swapping/bitmaps by
  12 *        David S. Miller (davem@caip.rutgers.edu), 1995
  13 */
  14
  15#include <linux/time.h>
  16#include <linux/fs.h>
  17#include <linux/jbd2.h>
  18#include <linux/stat.h>
  19#include <linux/string.h>
  20#include <linux/quotaops.h>
  21#include <linux/buffer_head.h>
  22#include <linux/random.h>
  23#include <linux/bitops.h>
  24#include <linux/blkdev.h>
  25#include <asm/byteorder.h>
  26
  27#include "ext4.h"
  28#include "ext4_jbd2.h"
  29#include "xattr.h"
  30#include "acl.h"
  31
  32#include <trace/events/ext4.h>
  33
  34/*
  35 * ialloc.c contains the inodes allocation and deallocation routines
  36 */
  37
  38/*
  39 * The free inodes are managed by bitmaps.  A file system contains several
  40 * blocks groups.  Each group contains 1 bitmap block for blocks, 1 bitmap
  41 * block for inodes, N blocks for the inode table and data blocks.
  42 *
  43 * The file system contains group descriptors which are located after the
  44 * super block.  Each descriptor contains the number of the bitmap block and
  45 * the free blocks count in the block.
  46 */
  47
  48/*
  49 * To avoid calling the atomic setbit hundreds or thousands of times, we only
  50 * need to use it within a single byte (to ensure we get endianness right).
  51 * We can use memset for the rest of the bitmap as there are no other users.
  52 */
  53void ext4_mark_bitmap_end(int start_bit, int end_bit, char *bitmap)
  54{
  55        int i;
  56
  57        if (start_bit >= end_bit)
  58                return;
  59
  60        ext4_debug("mark end bits +%d through +%d used\n", start_bit, end_bit);
  61        for (i = start_bit; i < ((start_bit + 7) & ~7UL); i++)
  62                ext4_set_bit(i, bitmap);
  63        if (i < end_bit)
  64                memset(bitmap + (i >> 3), 0xff, (end_bit - i) >> 3);
  65}
  66
  67/* Initializes an uninitialized inode bitmap */
  68static unsigned ext4_init_inode_bitmap(struct super_block *sb,
  69                                       struct buffer_head *bh,
  70                                       ext4_group_t block_group,
  71                                       struct ext4_group_desc *gdp)
  72{
  73        J_ASSERT_BH(bh, buffer_locked(bh));
  74
  75        /* If checksum is bad mark all blocks and inodes use to prevent
  76         * allocation, essentially implementing a per-group read-only flag. */
  77        if (!ext4_group_desc_csum_verify(sb, block_group, gdp)) {
  78                ext4_error(sb, "Checksum bad for group %u", block_group);
  79                ext4_free_group_clusters_set(sb, gdp, 0);
  80                ext4_free_inodes_set(sb, gdp, 0);
  81                ext4_itable_unused_set(sb, gdp, 0);
  82                memset(bh->b_data, 0xff, sb->s_blocksize);
  83                ext4_inode_bitmap_csum_set(sb, block_group, gdp, bh,
  84                                           EXT4_INODES_PER_GROUP(sb) / 8);
  85                return 0;
  86        }
  87
  88        memset(bh->b_data, 0, (EXT4_INODES_PER_GROUP(sb) + 7) / 8);
  89        ext4_mark_bitmap_end(EXT4_INODES_PER_GROUP(sb), sb->s_blocksize * 8,
  90                        bh->b_data);
  91        ext4_inode_bitmap_csum_set(sb, block_group, gdp, bh,
  92                                   EXT4_INODES_PER_GROUP(sb) / 8);
  93        ext4_group_desc_csum_set(sb, block_group, gdp);
  94
  95        return EXT4_INODES_PER_GROUP(sb);
  96}
  97
  98void ext4_end_bitmap_read(struct buffer_head *bh, int uptodate)
  99{
 100        if (uptodate) {
 101                set_buffer_uptodate(bh);
 102                set_bitmap_uptodate(bh);
 103        }
 104        unlock_buffer(bh);
 105        put_bh(bh);
 106}
 107
 108/*
 109 * Read the inode allocation bitmap for a given block_group, reading
 110 * into the specified slot in the superblock's bitmap cache.
 111 *
 112 * Return buffer_head of bitmap on success or NULL.
 113 */
 114static struct buffer_head *
 115ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
 116{
 117        struct ext4_group_desc *desc;
 118        struct buffer_head *bh = NULL;
 119        ext4_fsblk_t bitmap_blk;
 120
 121        desc = ext4_get_group_desc(sb, block_group, NULL);
 122        if (!desc)
 123                return NULL;
 124
 125        bitmap_blk = ext4_inode_bitmap(sb, desc);
 126        bh = sb_getblk(sb, bitmap_blk);
 127        if (unlikely(!bh)) {
 128                ext4_error(sb, "Cannot read inode bitmap - "
 129                            "block_group = %u, inode_bitmap = %llu",
 130                            block_group, bitmap_blk);
 131                return NULL;
 132        }
 133        if (bitmap_uptodate(bh))
 134                goto verify;
 135
 136        lock_buffer(bh);
 137        if (bitmap_uptodate(bh)) {
 138                unlock_buffer(bh);
 139                goto verify;
 140        }
 141
 142        ext4_lock_group(sb, block_group);
 143        if (desc->bg_flags & cpu_to_le16(EXT4_BG_INODE_UNINIT)) {
 144                ext4_init_inode_bitmap(sb, bh, block_group, desc);
 145                set_bitmap_uptodate(bh);
 146                set_buffer_uptodate(bh);
 147                set_buffer_verified(bh);
 148                ext4_unlock_group(sb, block_group);
 149                unlock_buffer(bh);
 150                return bh;
 151        }
 152        ext4_unlock_group(sb, block_group);
 153
 154        if (buffer_uptodate(bh)) {
 155                /*
 156                 * if not uninit if bh is uptodate,
 157                 * bitmap is also uptodate
 158                 */
 159                set_bitmap_uptodate(bh);
 160                unlock_buffer(bh);
 161                goto verify;
 162        }
 163        /*
 164         * submit the buffer_head for reading
 165         */
 166        trace_ext4_load_inode_bitmap(sb, block_group);
 167        bh->b_end_io = ext4_end_bitmap_read;
 168        get_bh(bh);
 169        submit_bh(READ, bh);
 170        wait_on_buffer(bh);
 171        if (!buffer_uptodate(bh)) {
 172                put_bh(bh);
 173                ext4_error(sb, "Cannot read inode bitmap - "
 174                           "block_group = %u, inode_bitmap = %llu",
 175                           block_group, bitmap_blk);
 176                return NULL;
 177        }
 178
 179verify:
 180        ext4_lock_group(sb, block_group);
 181        if (!buffer_verified(bh) &&
 182            !ext4_inode_bitmap_csum_verify(sb, block_group, desc, bh,
 183                                           EXT4_INODES_PER_GROUP(sb) / 8)) {
 184                ext4_unlock_group(sb, block_group);
 185                put_bh(bh);
 186                ext4_error(sb, "Corrupt inode bitmap - block_group = %u, "
 187                           "inode_bitmap = %llu", block_group, bitmap_blk);
 188                return NULL;
 189        }
 190        ext4_unlock_group(sb, block_group);
 191        set_buffer_verified(bh);
 192        return bh;
 193}
 194
 195/*
 196 * NOTE! When we get the inode, we're the only people
 197 * that have access to it, and as such there are no
 198 * race conditions we have to worry about. The inode
 199 * is not on the hash-lists, and it cannot be reached
 200 * through the filesystem because the directory entry
 201 * has been deleted earlier.
 202 *
 203 * HOWEVER: we must make sure that we get no aliases,
 204 * which means that we have to call "clear_inode()"
 205 * _before_ we mark the inode not in use in the inode
 206 * bitmaps. Otherwise a newly created file might use
 207 * the same inode number (not actually the same pointer
 208 * though), and then we'd have two inodes sharing the
 209 * same inode number and space on the harddisk.
 210 */
 211void ext4_free_inode(handle_t *handle, struct inode *inode)
 212{
 213        struct super_block *sb = inode->i_sb;
 214        int is_directory;
 215        unsigned long ino;
 216        struct buffer_head *bitmap_bh = NULL;
 217        struct buffer_head *bh2;
 218        ext4_group_t block_group;
 219        unsigned long bit;
 220        struct ext4_group_desc *gdp;
 221        struct ext4_super_block *es;
 222        struct ext4_sb_info *sbi;
 223        int fatal = 0, err, count, cleared;
 224
 225        if (!sb) {
 226                printk(KERN_ERR "EXT4-fs: %s:%d: inode on "
 227                       "nonexistent device\n", __func__, __LINE__);
 228                return;
 229        }
 230        if (atomic_read(&inode->i_count) > 1) {
 231                ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: count=%d",
 232                         __func__, __LINE__, inode->i_ino,
 233                         atomic_read(&inode->i_count));
 234                return;
 235        }
 236        if (inode->i_nlink) {
 237                ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: nlink=%d\n",
 238                         __func__, __LINE__, inode->i_ino, inode->i_nlink);
 239                return;
 240        }
 241        sbi = EXT4_SB(sb);
 242
 243        ino = inode->i_ino;
 244        ext4_debug("freeing inode %lu\n", ino);
 245        trace_ext4_free_inode(inode);
 246
 247        /*
 248         * Note: we must free any quota before locking the superblock,
 249         * as writing the quota to disk may need the lock as well.
 250         */
 251        dquot_initialize(inode);
 252        ext4_xattr_delete_inode(handle, inode);
 253        dquot_free_inode(inode);
 254        dquot_drop(inode);
 255
 256        is_directory = S_ISDIR(inode->i_mode);
 257
 258        /* Do this BEFORE marking the inode not in use or returning an error */
 259        ext4_clear_inode(inode);
 260
 261        es = EXT4_SB(sb)->s_es;
 262        if (ino < EXT4_FIRST_INO(sb) || ino > le32_to_cpu(es->s_inodes_count)) {
 263                ext4_error(sb, "reserved or nonexistent inode %lu", ino);
 264                goto error_return;
 265        }
 266        block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb);
 267        bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb);
 268        bitmap_bh = ext4_read_inode_bitmap(sb, block_group);
 269        if (!bitmap_bh)
 270                goto error_return;
 271
 272        BUFFER_TRACE(bitmap_bh, "get_write_access");
 273        fatal = ext4_journal_get_write_access(handle, bitmap_bh);
 274        if (fatal)
 275                goto error_return;
 276
 277        fatal = -ESRCH;
 278        gdp = ext4_get_group_desc(sb, block_group, &bh2);
 279        if (gdp) {
 280                BUFFER_TRACE(bh2, "get_write_access");
 281                fatal = ext4_journal_get_write_access(handle, bh2);
 282        }
 283        ext4_lock_group(sb, block_group);
 284        cleared = ext4_test_and_clear_bit(bit, bitmap_bh->b_data);
 285        if (fatal || !cleared) {
 286                ext4_unlock_group(sb, block_group);
 287                goto out;
 288        }
 289
 290        count = ext4_free_inodes_count(sb, gdp) + 1;
 291        ext4_free_inodes_set(sb, gdp, count);
 292        if (is_directory) {
 293                count = ext4_used_dirs_count(sb, gdp) - 1;
 294                ext4_used_dirs_set(sb, gdp, count);
 295                percpu_counter_dec(&sbi->s_dirs_counter);
 296        }
 297        ext4_inode_bitmap_csum_set(sb, block_group, gdp, bitmap_bh,
 298                                   EXT4_INODES_PER_GROUP(sb) / 8);
 299        ext4_group_desc_csum_set(sb, block_group, gdp);
 300        ext4_unlock_group(sb, block_group);
 301
 302        percpu_counter_inc(&sbi->s_freeinodes_counter);
 303        if (sbi->s_log_groups_per_flex) {
 304                ext4_group_t f = ext4_flex_group(sbi, block_group);
 305
 306                atomic_inc(&sbi->s_flex_groups[f].free_inodes);
 307                if (is_directory)
 308                        atomic_dec(&sbi->s_flex_groups[f].used_dirs);
 309        }
 310        BUFFER_TRACE(bh2, "call ext4_handle_dirty_metadata");
 311        fatal = ext4_handle_dirty_metadata(handle, NULL, bh2);
 312out:
 313        if (cleared) {
 314                BUFFER_TRACE(bitmap_bh, "call ext4_handle_dirty_metadata");
 315                err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh);
 316                if (!fatal)
 317                        fatal = err;
 318        } else
 319                ext4_error(sb, "bit already cleared for inode %lu", ino);
 320
 321error_return:
 322        brelse(bitmap_bh);
 323        ext4_std_error(sb, fatal);
 324}
 325
 326struct orlov_stats {
 327        __u32 free_inodes;
 328        __u32 free_clusters;
 329        __u32 used_dirs;
 330};
 331
 332/*
 333 * Helper function for Orlov's allocator; returns critical information
 334 * for a particular block group or flex_bg.  If flex_size is 1, then g
 335 * is a block group number; otherwise it is flex_bg number.
 336 */
 337static void get_orlov_stats(struct super_block *sb, ext4_group_t g,
 338                            int flex_size, struct orlov_stats *stats)
 339{
 340        struct ext4_group_desc *desc;
 341        struct flex_groups *flex_group = EXT4_SB(sb)->s_flex_groups;
 342
 343        if (flex_size > 1) {
 344                stats->free_inodes = atomic_read(&flex_group[g].free_inodes);
 345                stats->free_clusters = atomic_read(&flex_group[g].free_clusters);
 346                stats->used_dirs = atomic_read(&flex_group[g].used_dirs);
 347                return;
 348        }
 349
 350        desc = ext4_get_group_desc(sb, g, NULL);
 351        if (desc) {
 352                stats->free_inodes = ext4_free_inodes_count(sb, desc);
 353                stats->free_clusters = ext4_free_group_clusters(sb, desc);
 354                stats->used_dirs = ext4_used_dirs_count(sb, desc);
 355        } else {
 356                stats->free_inodes = 0;
 357                stats->free_clusters = 0;
 358                stats->used_dirs = 0;
 359        }
 360}
 361
 362/*
 363 * Orlov's allocator for directories.
 364 *
 365 * We always try to spread first-level directories.
 366 *
 367 * If there are blockgroups with both free inodes and free blocks counts
 368 * not worse than average we return one with smallest directory count.
 369 * Otherwise we simply return a random group.
 370 *
 371 * For the rest rules look so:
 372 *
 373 * It's OK to put directory into a group unless
 374 * it has too many directories already (max_dirs) or
 375 * it has too few free inodes left (min_inodes) or
 376 * it has too few free blocks left (min_blocks) or
 377 * Parent's group is preferred, if it doesn't satisfy these
 378 * conditions we search cyclically through the rest. If none
 379 * of the groups look good we just look for a group with more
 380 * free inodes than average (starting at parent's group).
 381 */
 382
 383static int find_group_orlov(struct super_block *sb, struct inode *parent,
 384                            ext4_group_t *group, umode_t mode,
 385                            const struct qstr *qstr)
 386{
 387        ext4_group_t parent_group = EXT4_I(parent)->i_block_group;
 388        struct ext4_sb_info *sbi = EXT4_SB(sb);
 389        ext4_group_t real_ngroups = ext4_get_groups_count(sb);
 390        int inodes_per_group = EXT4_INODES_PER_GROUP(sb);
 391        unsigned int freei, avefreei, grp_free;
 392        ext4_fsblk_t freeb, avefreec;
 393        unsigned int ndirs;
 394        int max_dirs, min_inodes;
 395        ext4_grpblk_t min_clusters;
 396        ext4_group_t i, grp, g, ngroups;
 397        struct ext4_group_desc *desc;
 398        struct orlov_stats stats;
 399        int flex_size = ext4_flex_bg_size(sbi);
 400        struct dx_hash_info hinfo;
 401
 402        ngroups = real_ngroups;
 403        if (flex_size > 1) {
 404                ngroups = (real_ngroups + flex_size - 1) >>
 405                        sbi->s_log_groups_per_flex;
 406                parent_group >>= sbi->s_log_groups_per_flex;
 407        }
 408
 409        freei = percpu_counter_read_positive(&sbi->s_freeinodes_counter);
 410        avefreei = freei / ngroups;
 411        freeb = EXT4_C2B(sbi,
 412                percpu_counter_read_positive(&sbi->s_freeclusters_counter));
 413        avefreec = freeb;
 414        do_div(avefreec, ngroups);
 415        ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter);
 416
 417        if (S_ISDIR(mode) &&
 418            ((parent == sb->s_root->d_inode) ||
 419             (ext4_test_inode_flag(parent, EXT4_INODE_TOPDIR)))) {
 420                int best_ndir = inodes_per_group;
 421                int ret = -1;
 422
 423                if (qstr) {
 424                        hinfo.hash_version = DX_HASH_HALF_MD4;
 425                        hinfo.seed = sbi->s_hash_seed;
 426                        ext4fs_dirhash(qstr->name, qstr->len, &hinfo);
 427                        grp = hinfo.hash;
 428                } else
 429                        get_random_bytes(&grp, sizeof(grp));
 430                parent_group = (unsigned)grp % ngroups;
 431                for (i = 0; i < ngroups; i++) {
 432                        g = (parent_group + i) % ngroups;
 433                        get_orlov_stats(sb, g, flex_size, &stats);
 434                        if (!stats.free_inodes)
 435                                continue;
 436                        if (stats.used_dirs >= best_ndir)
 437                                continue;
 438                        if (stats.free_inodes < avefreei)
 439                                continue;
 440                        if (stats.free_clusters < avefreec)
 441                                continue;
 442                        grp = g;
 443                        ret = 0;
 444                        best_ndir = stats.used_dirs;
 445                }
 446                if (ret)
 447                        goto fallback;
 448        found_flex_bg:
 449                if (flex_size == 1) {
 450                        *group = grp;
 451                        return 0;
 452                }
 453
 454                /*
 455                 * We pack inodes at the beginning of the flexgroup's
 456                 * inode tables.  Block allocation decisions will do
 457                 * something similar, although regular files will
 458                 * start at 2nd block group of the flexgroup.  See
 459                 * ext4_ext_find_goal() and ext4_find_near().
 460                 */
 461                grp *= flex_size;
 462                for (i = 0; i < flex_size; i++) {
 463                        if (grp+i >= real_ngroups)
 464                                break;
 465                        desc = ext4_get_group_desc(sb, grp+i, NULL);
 466                        if (desc && ext4_free_inodes_count(sb, desc)) {
 467                                *group = grp+i;
 468                                return 0;
 469                        }
 470                }
 471                goto fallback;
 472        }
 473
 474        max_dirs = ndirs / ngroups + inodes_per_group / 16;
 475        min_inodes = avefreei - inodes_per_group*flex_size / 4;
 476        if (min_inodes < 1)
 477                min_inodes = 1;
 478        min_clusters = avefreec - EXT4_CLUSTERS_PER_GROUP(sb)*flex_size / 4;
 479
 480        /*
 481         * Start looking in the flex group where we last allocated an
 482         * inode for this parent directory
 483         */
 484        if (EXT4_I(parent)->i_last_alloc_group != ~0) {
 485                parent_group = EXT4_I(parent)->i_last_alloc_group;
 486                if (flex_size > 1)
 487                        parent_group >>= sbi->s_log_groups_per_flex;
 488        }
 489
 490        for (i = 0; i < ngroups; i++) {
 491                grp = (parent_group + i) % ngroups;
 492                get_orlov_stats(sb, grp, flex_size, &stats);
 493                if (stats.used_dirs >= max_dirs)
 494                        continue;
 495                if (stats.free_inodes < min_inodes)
 496                        continue;
 497                if (stats.free_clusters < min_clusters)
 498                        continue;
 499                goto found_flex_bg;
 500        }
 501
 502fallback:
 503        ngroups = real_ngroups;
 504        avefreei = freei / ngroups;
 505fallback_retry:
 506        parent_group = EXT4_I(parent)->i_block_group;
 507        for (i = 0; i < ngroups; i++) {
 508                grp = (parent_group + i) % ngroups;
 509                desc = ext4_get_group_desc(sb, grp, NULL);
 510                if (desc) {
 511                        grp_free = ext4_free_inodes_count(sb, desc);
 512                        if (grp_free && grp_free >= avefreei) {
 513                                *group = grp;
 514                                return 0;
 515                        }
 516                }
 517        }
 518
 519        if (avefreei) {
 520                /*
 521                 * The free-inodes counter is approximate, and for really small
 522                 * filesystems the above test can fail to find any blockgroups
 523                 */
 524                avefreei = 0;
 525                goto fallback_retry;
 526        }
 527
 528        return -1;
 529}
 530
 531static int find_group_other(struct super_block *sb, struct inode *parent,
 532                            ext4_group_t *group, umode_t mode)
 533{
 534        ext4_group_t parent_group = EXT4_I(parent)->i_block_group;
 535        ext4_group_t i, last, ngroups = ext4_get_groups_count(sb);
 536        struct ext4_group_desc *desc;
 537        int flex_size = ext4_flex_bg_size(EXT4_SB(sb));
 538
 539        /*
 540         * Try to place the inode is the same flex group as its
 541         * parent.  If we can't find space, use the Orlov algorithm to
 542         * find another flex group, and store that information in the
 543         * parent directory's inode information so that use that flex
 544         * group for future allocations.
 545         */
 546        if (flex_size > 1) {
 547                int retry = 0;
 548
 549        try_again:
 550                parent_group &= ~(flex_size-1);
 551                last = parent_group + flex_size;
 552                if (last > ngroups)
 553                        last = ngroups;
 554                for  (i = parent_group; i < last; i++) {
 555                        desc = ext4_get_group_desc(sb, i, NULL);
 556                        if (desc && ext4_free_inodes_count(sb, desc)) {
 557                                *group = i;
 558                                return 0;
 559                        }
 560                }
 561                if (!retry && EXT4_I(parent)->i_last_alloc_group != ~0) {
 562                        retry = 1;
 563                        parent_group = EXT4_I(parent)->i_last_alloc_group;
 564                        goto try_again;
 565                }
 566                /*
 567                 * If this didn't work, use the Orlov search algorithm
 568                 * to find a new flex group; we pass in the mode to
 569                 * avoid the topdir algorithms.
 570                 */
 571                *group = parent_group + flex_size;
 572                if (*group > ngroups)
 573                        *group = 0;
 574                return find_group_orlov(sb, parent, group, mode, NULL);
 575        }
 576
 577        /*
 578         * Try to place the inode in its parent directory
 579         */
 580        *group = parent_group;
 581        desc = ext4_get_group_desc(sb, *group, NULL);
 582        if (desc && ext4_free_inodes_count(sb, desc) &&
 583            ext4_free_group_clusters(sb, desc))
 584                return 0;
 585
 586        /*
 587         * We're going to place this inode in a different blockgroup from its
 588         * parent.  We want to cause files in a common directory to all land in
 589         * the same blockgroup.  But we want files which are in a different
 590         * directory which shares a blockgroup with our parent to land in a
 591         * different blockgroup.
 592         *
 593         * So add our directory's i_ino into the starting point for the hash.
 594         */
 595        *group = (*group + parent->i_ino) % ngroups;
 596
 597        /*
 598         * Use a quadratic hash to find a group with a free inode and some free
 599         * blocks.
 600         */
 601        for (i = 1; i < ngroups; i <<= 1) {
 602                *group += i;
 603                if (*group >= ngroups)
 604                        *group -= ngroups;
 605                desc = ext4_get_group_desc(sb, *group, NULL);
 606                if (desc && ext4_free_inodes_count(sb, desc) &&
 607                    ext4_free_group_clusters(sb, desc))
 608                        return 0;
 609        }
 610
 611        /*
 612         * That failed: try linear search for a free inode, even if that group
 613         * has no free blocks.
 614         */
 615        *group = parent_group;
 616        for (i = 0; i < ngroups; i++) {
 617                if (++*group >= ngroups)
 618                        *group = 0;
 619                desc = ext4_get_group_desc(sb, *group, NULL);
 620                if (desc && ext4_free_inodes_count(sb, desc))
 621                        return 0;
 622        }
 623
 624        return -1;
 625}
 626
 627/*
 628 * There are two policies for allocating an inode.  If the new inode is
 629 * a directory, then a forward search is made for a block group with both
 630 * free space and a low directory-to-inode ratio; if that fails, then of
 631 * the groups with above-average free space, that group with the fewest
 632 * directories already is chosen.
 633 *
 634 * For other inodes, search forward from the parent directory's block
 635 * group to find a free inode.
 636 */
 637struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, umode_t mode,
 638                             const struct qstr *qstr, __u32 goal, uid_t *owner)
 639{
 640        struct super_block *sb;
 641        struct buffer_head *inode_bitmap_bh = NULL;
 642        struct buffer_head *group_desc_bh;
 643        ext4_group_t ngroups, group = 0;
 644        unsigned long ino = 0;
 645        struct inode *inode;
 646        struct ext4_group_desc *gdp = NULL;
 647        struct ext4_inode_info *ei;
 648        struct ext4_sb_info *sbi;
 649        int ret2, err = 0;
 650        struct inode *ret;
 651        ext4_group_t i;
 652        ext4_group_t flex_group;
 653
 654        /* Cannot create files in a deleted directory */
 655        if (!dir || !dir->i_nlink)
 656                return ERR_PTR(-EPERM);
 657
 658        sb = dir->i_sb;
 659        ngroups = ext4_get_groups_count(sb);
 660        trace_ext4_request_inode(dir, mode);
 661        inode = new_inode(sb);
 662        if (!inode)
 663                return ERR_PTR(-ENOMEM);
 664        ei = EXT4_I(inode);
 665        sbi = EXT4_SB(sb);
 666
 667        if (!goal)
 668                goal = sbi->s_inode_goal;
 669
 670        if (goal && goal <= le32_to_cpu(sbi->s_es->s_inodes_count)) {
 671                group = (goal - 1) / EXT4_INODES_PER_GROUP(sb);
 672                ino = (goal - 1) % EXT4_INODES_PER_GROUP(sb);
 673                ret2 = 0;
 674                goto got_group;
 675        }
 676
 677        if (S_ISDIR(mode))
 678                ret2 = find_group_orlov(sb, dir, &group, mode, qstr);
 679        else
 680                ret2 = find_group_other(sb, dir, &group, mode);
 681
 682got_group:
 683        EXT4_I(dir)->i_last_alloc_group = group;
 684        err = -ENOSPC;
 685        if (ret2 == -1)
 686                goto out;
 687
 688        /*
 689         * Normally we will only go through one pass of this loop,
 690         * unless we get unlucky and it turns out the group we selected
 691         * had its last inode grabbed by someone else.
 692         */
 693        for (i = 0; i < ngroups; i++, ino = 0) {
 694                err = -EIO;
 695
 696                gdp = ext4_get_group_desc(sb, group, &group_desc_bh);
 697                if (!gdp)
 698                        goto fail;
 699
 700                /*
 701                 * Check free inodes count before loading bitmap.
 702                 */
 703                if (ext4_free_inodes_count(sb, gdp) == 0) {
 704                        if (++group == ngroups)
 705                                group = 0;
 706                        continue;
 707                }
 708
 709                brelse(inode_bitmap_bh);
 710                inode_bitmap_bh = ext4_read_inode_bitmap(sb, group);
 711                if (!inode_bitmap_bh)
 712                        goto fail;
 713
 714repeat_in_this_group:
 715                ino = ext4_find_next_zero_bit((unsigned long *)
 716                                              inode_bitmap_bh->b_data,
 717                                              EXT4_INODES_PER_GROUP(sb), ino);
 718                if (ino >= EXT4_INODES_PER_GROUP(sb)) {
 719                        if (++group == ngroups)
 720                                group = 0;
 721                        continue;
 722                }
 723                if (group == 0 && (ino+1) < EXT4_FIRST_INO(sb)) {
 724                        ext4_error(sb, "reserved inode found cleared - "
 725                                   "inode=%lu", ino + 1);
 726                        continue;
 727                }
 728                BUFFER_TRACE(inode_bitmap_bh, "get_write_access");
 729                err = ext4_journal_get_write_access(handle, inode_bitmap_bh);
 730                if (err)
 731                        goto fail;
 732                ext4_lock_group(sb, group);
 733                ret2 = ext4_test_and_set_bit(ino, inode_bitmap_bh->b_data);
 734                ext4_unlock_group(sb, group);
 735                ino++;          /* the inode bitmap is zero-based */
 736                if (!ret2)
 737                        goto got; /* we grabbed the inode! */
 738                if (ino < EXT4_INODES_PER_GROUP(sb))
 739                        goto repeat_in_this_group;
 740        }
 741        err = -ENOSPC;
 742        goto out;
 743
 744got:
 745        BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata");
 746        err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh);
 747        if (err)
 748                goto fail;
 749
 750        /* We may have to initialize the block bitmap if it isn't already */
 751        if (ext4_has_group_desc_csum(sb) &&
 752            gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
 753                struct buffer_head *block_bitmap_bh;
 754
 755                block_bitmap_bh = ext4_read_block_bitmap(sb, group);
 756                BUFFER_TRACE(block_bitmap_bh, "get block bitmap access");
 757                err = ext4_journal_get_write_access(handle, block_bitmap_bh);
 758                if (err) {
 759                        brelse(block_bitmap_bh);
 760                        goto fail;
 761                }
 762
 763                BUFFER_TRACE(block_bitmap_bh, "dirty block bitmap");
 764                err = ext4_handle_dirty_metadata(handle, NULL, block_bitmap_bh);
 765
 766                /* recheck and clear flag under lock if we still need to */
 767                ext4_lock_group(sb, group);
 768                if (gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) {
 769                        gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT);
 770                        ext4_free_group_clusters_set(sb, gdp,
 771                                ext4_free_clusters_after_init(sb, group, gdp));
 772                        ext4_block_bitmap_csum_set(sb, group, gdp,
 773                                                   block_bitmap_bh);
 774                        ext4_group_desc_csum_set(sb, group, gdp);
 775                }
 776                ext4_unlock_group(sb, group);
 777                brelse(block_bitmap_bh);
 778
 779                if (err)
 780                        goto fail;
 781        }
 782
 783        BUFFER_TRACE(group_desc_bh, "get_write_access");
 784        err = ext4_journal_get_write_access(handle, group_desc_bh);
 785        if (err)
 786                goto fail;
 787
 788        /* Update the relevant bg descriptor fields */
 789        if (ext4_has_group_desc_csum(sb)) {
 790                int free;
 791                struct ext4_group_info *grp = ext4_get_group_info(sb, group);
 792
 793                down_read(&grp->alloc_sem); /* protect vs itable lazyinit */
 794                ext4_lock_group(sb, group); /* while we modify the bg desc */
 795                free = EXT4_INODES_PER_GROUP(sb) -
 796                        ext4_itable_unused_count(sb, gdp);
 797                if (gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_UNINIT)) {
 798                        gdp->bg_flags &= cpu_to_le16(~EXT4_BG_INODE_UNINIT);
 799                        free = 0;
 800                }
 801                /*
 802                 * Check the relative inode number against the last used
 803                 * relative inode number in this group. if it is greater
 804                 * we need to update the bg_itable_unused count
 805                 */
 806                if (ino > free)
 807                        ext4_itable_unused_set(sb, gdp,
 808                                        (EXT4_INODES_PER_GROUP(sb) - ino));
 809                up_read(&grp->alloc_sem);
 810        } else {
 811                ext4_lock_group(sb, group);
 812        }
 813
 814        ext4_free_inodes_set(sb, gdp, ext4_free_inodes_count(sb, gdp) - 1);
 815        if (S_ISDIR(mode)) {
 816                ext4_used_dirs_set(sb, gdp, ext4_used_dirs_count(sb, gdp) + 1);
 817                if (sbi->s_log_groups_per_flex) {
 818                        ext4_group_t f = ext4_flex_group(sbi, group);
 819
 820                        atomic_inc(&sbi->s_flex_groups[f].used_dirs);
 821                }
 822        }
 823        if (ext4_has_group_desc_csum(sb)) {
 824                ext4_inode_bitmap_csum_set(sb, group, gdp, inode_bitmap_bh,
 825                                           EXT4_INODES_PER_GROUP(sb) / 8);
 826                ext4_group_desc_csum_set(sb, group, gdp);
 827        }
 828        ext4_unlock_group(sb, group);
 829
 830        BUFFER_TRACE(group_desc_bh, "call ext4_handle_dirty_metadata");
 831        err = ext4_handle_dirty_metadata(handle, NULL, group_desc_bh);
 832        if (err)
 833                goto fail;
 834
 835        percpu_counter_dec(&sbi->s_freeinodes_counter);
 836        if (S_ISDIR(mode))
 837                percpu_counter_inc(&sbi->s_dirs_counter);
 838
 839        if (sbi->s_log_groups_per_flex) {
 840                flex_group = ext4_flex_group(sbi, group);
 841                atomic_dec(&sbi->s_flex_groups[flex_group].free_inodes);
 842        }
 843        if (owner) {
 844                inode->i_mode = mode;
 845                i_uid_write(inode, owner[0]);
 846                i_gid_write(inode, owner[1]);
 847        } else if (test_opt(sb, GRPID)) {
 848                inode->i_mode = mode;
 849                inode->i_uid = current_fsuid();
 850                inode->i_gid = dir->i_gid;
 851        } else
 852                inode_init_owner(inode, dir, mode);
 853
 854        inode->i_ino = ino + group * EXT4_INODES_PER_GROUP(sb);
 855        /* This is the optimal IO size (+9r st)class="srefallot usedfstmap&qu st)c
 7568/a>  85    inode->free_inodasmap&q" href="f="fs/ext4/ialloc.c#L800" id="L757" clas8="line" name="L757"> 7578/a>  8             <+code=inode" class="sref">inode->i_mode =siz" href="+code=ino" class="="sref">inode->i_mode asiz" href="+code=ino" class="="sref">inode->i_mode csiz" href="+code=ino" clase"sref">sbi-&e;i_mode crsiz" href="fs/ext4/ialloc.c#L800" id="L748" class="line" name="L758"> 7588/a>  8             if (siz"sref">i_modesiz"ref="+code=inode" class="sref">inode,  7598/a>  85href="fs/ext4/ialloc.c#L830" id="L760" clas8="line" name="L760"> 7608/a>  86    ext4_groumems="ref="+code=inode" cle"sref">sbi-&e;ext4_handi,
sbi-&e;ext4_handi,
 7618/a>  86    sbi-&e;group> sir_"srrt_look=" href="f="fs/ext4/ialloc.c#L800" id="L762" clas8="line" name="L762"> 7628/a>
<862   sbi-&e;group> sisk st) href="f="fs/ext4/ialloc.c#L800" id="L753" class="line" name="L763"> 7638/a>  86href="fs/ext4/ialloc.c#L854" id="L764" clas8="line" name="L764"> 7648/a>  8             /* This is tDolready *inhe 7658/a>
<86    sbi-&e;bg_flags &=  7668/a>  8             bg_flags<_groumask ass="ref="+code=mode" class="sref">mode))
EXT4_INODES_PERref="+code=mode" clas="sref">dir, bg_flags &= GRPIDT_INO 7678/a>  86            <+code=inode" cls"sref">sbi-&e;fail;> ail/a>(" href="f="fs/ext4/ialloc.c#L800" id="L748" class="line" name="L768"> 7688/a>  86    sbi-&e;i_mode dsiz" href="f="fs/ext4/ialloc.c#L800" id="L749" class="line" name="L769"> 7698/a>  8              +code=ext4_unloc"sref">sbi-&e;ext4_unlo> bp" class=" href="+code=ino" clasass="sref">group *  7708/a>  87    sbi-&e;t_);ass="sref">ext4_unlo> f">t_);ass=" href="~f="fs/ext4/ialloc.c#L800" id="L771" clas8="line" name="L771"> 7718/a>  8      "fs/ext4/ialloc.c#L800" id="L762" clas8="line" name="L772"> 7728/a>  872   (bg_flags<_groua>(inode,  7738/a>  87    if (ENOSPCinode,  7748/a>  8                     <+code=err" classgrourty_metsy="sref">percpu_cosgrourty_metsy="ref="+code=inode" cllass="sref">handle,  7758/a>  8             }ef="+code=ino" class=ser(i_gid;=ser(inode,  7768/a>  8             /*
 7778/a>  8      ss="comment">                 * we need tLikely access&qucorruptiocomausingmber into be 802" at
 7788/a>
<8 href=ss="comment">                 * we need ttwice.a href="fs/ext4/ialloc.c#L803" id="L749" class="line" name="L779"> 7798/a>  8      ss="comment">                 */
 7808/a>  8                     g+code=err" class="sref">err = -GRPIDTIO hre="fs/ext4/ialloc.c#L800" id="L781" clas8="line" name="L781"> 7818/a>  88            fail;
 7828/a>
<88    }
 7838/a>  8     sb);
sbi->sb);
 7848/a>  8     inode->i_gid;
sbi->i_gidounoc._generatioc 7858/a>  88    sb);
sbi->sb);
 7868/a>  8      "fs/ext4/ialloc.c#L855" id="L777" clas8="line" name="L787"> 7878/a>
<88            <+s="comment">/* This is tPre/* pute  cleasum sdateass=ber in/a>(
 7888/a>  8     BUFFER_TRT_INOHAS_RO_COMPAT_FEATUR"ref="+code=sb" class="sref">sb,  7898/a>  88                    GRPIDT_INO 7908/a>  8             int __u="     +code=current_fss="sref">ext4_has_ 7918/a>  8             struct ext4_get_groupsbass=" href=+code=sbi" class="sref">sbi->GRPIDT_INOSBref="+code=inode" class="sref">inode, sb,  7928/a>
<89            __le="     +code=current_fin="sref">ext4_has_in="16(~<="ref="+code=inode" class="sref">inode, i_ino =  7938/a>  8             __le="     +code=current_fgensref">group ec href="+code=ino" clas16(~<="line" namID16(~<="ref="+code=inode" class="sref">inode, i_gid;
 7948/a>  8             ext4_has_ext4_has_groupchks="ref="+code=sb" class=""sref">sbi, sbi->i_gidou/a>(__u    ext4_has_in=" 7958/a>  8             ext4_has_in=" 7968/a>  8                     <+code=ino" clase"sref">sbi-&e;i_gidiu/a>(ext4_has_groupchks="ref="+code=sb" class=""sref">sbi, ext4_has___u    group ec hre="fs/ext4/ialloc.c#L806" id="L777" clas8="line" name="L797"> 7978/a>  8             if (group ec hreef="fs/ext4/ialloc.c#L809" id="L778" clas8="line" name="L798"> 7988/a>  8              ="fs/ext4/ialloc.c#L843" id="L799" clas8="line" name="L799"> 7998/a>  89href="fs/ext4/ialloc.c#L830" id="9800" clas9="line" name="L800"> 8009/a>  90    bg_flags<_grouc und_"srtneass="ref="+code=inode" cle"sref">sbi-&e;/* while we Only bg descrion 32-bit archn>
 8019/a>  90    (bg_flags<_groua>(inode, GRPIDT_INOSTATE_NEW href="fs/ext4/ialloc.c#L855" id="9802" clas9="line" name="L802"> 8029/a> 8039/a>sbi-&e;group> oc.ra_i st)GRPIDT_INOSBref="+code=inode" cl="sref">sb);
groupouwscr oc.ra_i st)ref=="fs/ext4/ialloc.c#L855" id="9804" clas9="line" name="L804"> 8049/a> 8059/a>ext4_grour="ref=f="+code=ino" class="="sref">inode-> 7969/a>  90    )ergroupdan>)erinode,  8079/a>  90            <+code=inode" cls="sref">err = inodedan>)e);ass="ref="+code=inode" class="sref">inode,  7989/a>  90    err)
 8099/a>  9             flex_groups="_dro" 8109/a>  9     }"fs/ext4/ialloc.c#L855" id="9801" clas9="line" name="L811"> 8119/a>  91    err = fail;le_dir>("ref="+code=inode" cllass="sref">handle, inode, dir,  8129/a>  9     }
err)
 8139/a>
<91            goto flex_groups="_es_codro" 8149/a>  91href="fs/ext4/ialloc.c#L835" id="9815" clas9="line" name="L815"> 8159/a>  91    err = fail;le_dirsecurityref="+code=inode" cllass="sref">handle, inode, dir, dir, qst"href)="fs/ext4/ialloc.c#L855" id="9865" clas9="line" name="L816"> 8169/a>  91    if (err)
 8179/a>  9             if (flex_groups="_es_codro" 8189/a>  91href="fs/ext4/ialloc.c#L839" id="9819" clas9="line" name="L819"> 8199/a>
<91    if (BUFFER_TRT_INOHAS_INCOMPAT_FEATUR"ref="+code=sb" class="sref">sb, GRPIDT_INO 8209/a>  9                     /* while we a>(dle_hiser loconly ass=sirectory, ail/r flanorze (syme="k
 8219/a>  9             }
S_ISDIR(mode))
(S_ISDIR(mode))
(S_ISDIR(mode))
 8229/a>  92            (bg_flags<_groua>(inode, GRPIDT_INONIT 8239/a>  92            goto ext4_free_clusoc._ts)="ref="+code=inode" cllass="sref">handle, inode,  8249/a>  9              8259/a>  9              ="fs/ext4/ialloc.c#L843" id="9865" clas9="line" name="L826"> 8269/a>  92     "fs/ext4/ialloc.c#L855" id="9827" clas9="line" name="L827"> 8279/a>  9     }
i_gidgroup_dy_metv85s"ref="+code=inode" cllass="sref">handle,  8289/a>  92            sbi-&e;i_gid;
sy="_t=" href="+code=ext4_handlass="sref">handle, i_gidh_tsansactiochrefref="+code=s_flex_grt_t="sref">i_gidt_t=" hre="fs/ext4/ialloc.c#L855" id="9819" clas9="line" name="L829"> 8299/a>
<92            sbi-&e;i_gid;
ss="sy="_t=" href="+code=ext4_handlass="sref">handle, i_gidh_tsansactiochrefref="+code=s_flex_grt_t="sref">i_gidt_t=" hre="fs/ext4/ialloc.c#L855" id="9830" clas9="line" name="L830"> 8309/a>  9      8319/a>  93     "fs/ext4/ialloc.c#L800" id="9832" clas9="line" name="L832"> 8329/a>  932   err = i_gidgroupmarkhandle, inode,  8339/a>  93    if (err)
 8349/a>
<93                    <+code=err" classgroustd_err)
sb, err)
 8359/a>  93            flex_groups="_es_codro" 8369/a>  9     if ( 8379/a>  93href="fs/ext4/ialloc.c#L788" id="9838" clas9="line" name="L838"> 8389/a>
<93    bg_flags<_groudebu=ref="+s="string">"call ext4802" atingmber in%lu\npan>);
inode, i_ino =  8399/a>  93             +code=ext4_unlotsace__grou802" at
;ass="sref">inodetsace__grou802" at
;ass="ref="+code=inode" class="sref">inode, dir, mode);
 8409/a>  9             ext4_grour=853y_ou" 8419/a>  9      +code=fail" class="sref">flex_groups="    :"fs/ext4/ialloc.c#L855" id="9832" clas9="line" name="L842"> 8429/a>  942   err)
sb, err)
 8439/a>  9     i+code=free" claou"sref">ext4_grouou" 8449/a>  94    ext4_grouapu"ref="+code=inode" class="sref">inode,  8459/a>  94    ext4_grour="ref=f="+code=ino" clasERR_PT"sref">S_ISDIRerr)
 8469/a>  9      +code=fail" clare853y_ou"sref">ext4_grour=853y_ou" 8479/a>  94            <+code=inode" clbrref=sref">ext4_groubrref=ref="+code=inode" class="h" class="sref">inode_bitmap_bh,
 8489/a>  9             ext4_grour="ref=="fs/ext4/ialloc.c#L855" id="9839" clas9="line" name="L849"> 8499/a>  94href="fs/ext4/ialloc.c#L830" id="9850" clas9="line" name="L850"> 8509/a>  9      +code=fail" class="des_codro"sref">flex_groups="_es_codro" 8519/a>  95    )ees);
inodedan>)ees);
inode,  8529/a>  95href="fs/ext4/ialloc.c#L793" id="9853" clas9="line" name="L853"> 8539/a>
<95    i+code=free" class="_dro"sref">flex_groups="_dro" 8549/a>  9     )edro"sref">flex_groudan>)edro"ref="+code=inode" class="sref">inode,  8559/a>  95    inode, bg_flags &= S_ISDIRNOQUOTAref=="fs/ext4/ialloc.c#L855" id="9756" clas9="line" name="L756"> 7569/a>  95    S_ISDIRinode,  7579/a>  9             <+code=inode" cloupnewa>);
inodeoupnewa>);
inode,  7589/a>  95    ext4_grouapu"ref="+code=inode" class="sref">inode,  7599/a>  95             +code=ext4_unlobrref=sref">ext4_groubrref=ref="+code=inode" class="h" class="sref">inode_bitmap_bh,
 7609/a>  96    S_ISDIRerr)
 7619/a>  96    <="fs/ext4/ialloc.c#L843" id="9762" clas9="line" name="L762"> 7629/a>
<96href="fs/ext4/ialloc.c#L793" id="9753" clas9="line" name="L763"> 7639/a>  96n class="comment">         /* Verify thatto uare loadingma v85s" orph"cofrom sisk>
 7649/a>  9       href="+code=ext4_grouass="sref">inode, ext4_group_desorph"c_g="ref=" href="+code=ext4_grousu/a>)bp" csref">sb);
)bp" chreff=+code=sbi" clas="sref">sb, inode,  7659/a>
<96    <="fs/ext4/ialloc.c#L848" id="9766" clas9="line" name="L766"> 7669/a>  9             i_inomaxss="ref=f="+code=ino" clas~<="/a>(cpusref">i_ino~<="/a>(cpuref="+code=inode" clES_PESBsref">GRPIDT_INOSBref="+code=inode" cl="sref">sb);
free_inodou="hrefref="+code=i_gid" clsount" class="sref">ext4_freesount" class="href=="fs/ext4/ialloc.c#L855" id="9727" clas9="line" name="L767"> 7679/a>  96            <+code=inode" clsxt" class="sref">ext4_group_t ext4_unlobp" class=" hre="fs/ext4/ialloc.c#L855" id="9738" clas9="line" name="L768"> 7689/a>  96    ext4_freebi"ref=="fs/ext4/ialloc.c#L855" id="9749" clas9="line" name="L769"> 7699/a>  9               href="+code=ext4_groubuffa>)hs="sref">up_read)hs="hreff=+code=sbi" clas" class="sref">inode_bit,
 7709/a>  97    inode, inode, NULL,  7719/a>  97    err = -GRPIDTIO hre="fs/ext4/ialloc.c#L800" id="9762" clas9="line" name="L772"> 7729/a>  97href="fs/ext4/ialloc.c#L793" id="9773" clas9="line" name="L773"> 7739/a>  97    if (         /* Ea o" cases - e2fsck has alrs="y c unned up ass=un>
 7749/a>  9              ef="+code=ino" class="sref">ino + i_inomaxss="ref==f="fs/ext4/ialloc.c#L848" id="9765" clas9="line" name="L775"> 7759/a>  97            ext4_group_tsb, "call ext4ba" orph"cos="n%lu!  e2fsck was run?pan>);
inode,  7769/a>  9             err)
 7779/a>  97    }
 7789/a>
<97href="fs/ext4/ialloc.c#L839" id="9749" clas9="line" name="L779"> 7799/a>  97             +code=ext4_unlobp" class="sref">ext4_unlobp" class=" hreef="+code=ino" class="sref">ino + EXT4_INODES_PER_GROUP(sb);
 7809/a>  98    ext4_freebi"ref=ef="+code=ino" class="sref">ino + EXT4_INODES_PER_GROUP(sb);
 7819/a>  98    inode_bit,
ext4_group_tsb, ext4_unlobp" class=" href="fs/ext4/ialloc.c#L855" id="9762" clas9="line" name="L782"> 7829/a>
<98    }
inode_bit,
 7839/a>  98            ext4_group_tsb, "call ext4ber incess&qu);
inode,  7849/a>  98                    err)
 7859/a>  98             ="fs/ext4/ialloc.c#L843" id="9776" clas9="line" name="L786"> 7869/a>  9      "fs/ext4/ialloc.c#L855" id="9777" clas9="line" name="L787"> 7879/a>
<98            <+s="comment">/* This is tHavingmusedber inces a>(dshould be 8 100%rindicatss=thattthisa href="fs/ext4/ialloc.c#L789" id="9778" clas9="line" name="L788"> 7889/a>  98href=ss="comment">                 **ptima v85s" orph"co(="ne2fsck runion fs).  Orph"cs alsorinclua hrhref="fs/ext4/ialloc.c#L789" id="9749" clas9="line" name="L789"> 7899/a>  98     ss="comment">                 **dber is thatto rinceingmurun at
<, sorwe calready * clea i_ne="k==0.a href="fs/ext4/ialloc.c#L803" id="9790" clas9="line" name="L790"> 7909/a>  9      ss="comment">                 ** 7919/a>  9             sef="!+code=err" clasp_t(ext4_freep_t(ext4_freebi"ref=="+code=free" clab class="sref">inode_bit,
ext4_handb,
 7929/a>
<99            ext4_handba"sorph"cref=="fs/ext4/ialloc.c#L800" id="9783" clas9="line" name="L793"> 7939/a>  99href="fs/ext4/ialloc.c#L854" id="9784" clas9="line" name="L794"> 7949/a>  99    inode, ext4_group_desig="ref="+code=inode" cl="sref">sb, inode,  7959/a>  9             S_ISDIRinode,  7969/a>  9                     i_gidig="_ps="e"ref=="fs/ext4/ialloc.c#L800" id="9777" clas9="line" name="L797"> 7979/a>  99href="fs/ext4/ialloc.c#L788" id="9778" clas9="line" name="L798"> 7989/a>  9              +s="comment">/*
 7999/a>  99     ss="comment">                 **dIfmal IOrph"cs has i_ne="ksfef="m0mal n i(dshould be 8blinto bea href="fs/ext4/ialloc.c#L802" id="10090" clas10090"ne" name="L799"> 79910090>1009    ss="comment">                 **durun at
<, ouserwi hrettoolready *be removatearom al IOrph"c lista href="f/pre>do"L79 cla36/53/4d6c748a947784cbc959d76020f94efa9d7b_3/10090>fs/ext4/ialloc.c#L802" id="10010" clas100"line" name="L791"> 791100"l>1001    ss="comment">                 **dduot;c processingm fla"cos=f>)="e loop will result.a href="fs/ext4/ialloc.c#L803" id="10020" clas100"line" name="L792"> 792100"l>1002    ss="comment">                 ** 793100"l>100    if (inode, S_ISDIRext4_group_descal_urun at
ref="+code=inode" class="sref">inode,  794100"l>100                    ext4_handba"sorph"cref=="fs/ext4/ialloc.c#L800" id="10050" clas100"line" name="L795"> 795100"l>1005ref="fs/ext4/ialloc.c#L788" id="10060" clas100"line" name="L796"> 796100"l>100    if (NULL, EXT_ORPHANref="+code=inode" class="sref">inode, i_inomaxss="ref=="fs/ext4/ialloc.c#L788" id="10070" clas100"line" name="L797"> 797100"l>100            if (ext4_handba"sorph"cref=="fs/ext4/ialloc.c#L800" id="10080" clas100"line" name="L798"> 798100"l>100    ext4_groubrref=ref="+code=inode" cl" class="sref">inode_bit,
 799100"l>100             r="urn"+code=percpu_cos="="sref">inode-> 81010="l>10="ref="fs/ext4/ialloc.c#L788" id="10110" clas10="line" name="L811"> 81110="l>10=     +code=fail" claig="_ps="e"sref">i_gidig="_ps="e"ref=:"fs/ext4/ialloc.c#L855" id="10=20" clas10="line" name="L812"> 81210="l>10=2   err = S_ISDIRinode,  81310="l>10=    inode, NULL,  81410="l>10=4    +code=fail" claba"sorph"csref">ext4_handba"sorph"cref=:"fs/ext4/ialloc.c#L855" id="10=50" clas10="line" name="L815"> 81510="l>10=    ext4_group_tsb, "call ext4ba" orph"cos=" in%lu!  e2fsck was run?pan>);
inode,  81610="l>10=    S_ISDIRS_ISDIR"call ext4p_t();
 81710="l>10=            if (ext4_freebi"ref=="(unsigned longmlong)+code=free" clab class="sref">inode_bit,
err =b bp" cn"ref=="fs/ext4/ialloc.c#L800" id="10=80" clas10="line" name="L818"> 81810="l>10=            (ext4_freep_t(ext4_freebi"ref=="+code=free" clab class="sref">inode_bit,
ext4_handb,
 81910="l>10=             +code=ext4_unlopot;tksref">S_ISDIRS_ISDIR"call ext4s=" i=%p\npan>);
inode,  82010="l>10="   if (inode,  82110="l>10=            }
S_ISDIRS_ISDIR"call ext4ss_b="tmap_c(map_c)=%<\npan>);
 82210="l>10=            inode,s_b="tmap_cref="+code=inode" class="sref">inode,  82310="l>10=            S_ISDIRS_ISDIR"call ext4 EXT_ORPHAN(map_c)=%u\npan>);
 82410="l>10=                    < href="+code=down_readNEXT_ORPHANsref">NULL, EXT_ORPHANref="+code=inode" class="sref">inode,  82510="l>10=            S_ISDIRS_ISDIR"call ext4maxss="=%lu\npan>);
i_inomaxss="ref==="fs/ext4/ialloc.c#L800" id="10260" clas10="line" name="L826"> 82610="l>10=                    <+code=ino" claspot;tksref">S_ISDIRS_ISDIR"call ext4s_ne="k=%u\npan>);
inode, S_ISDIR 82710="l>10=            if (/* This is tAvoiteareeingmbp" csref=werref acca" deleted s=" in* 82810="l>10=            inode, S_ISDIR 82910="l>10=                    inode, S_ISDIR 83010="l>10="                   <+code=ino" clasapu"sref">ext4_grouapu"ref="+code=inode" class="sref">inode,  83110="l>10=            }="fs/ext4/ialloc.c#L843" id="10=20" clas10="line" name="L832"> 83210="l>10=2   ext4_groubrref=ref="+code=inode" cl" class="sref">inode_bit,
 83310="l>10=    i+code=free" claerr)
 83410="l>10=             r="urn"+code=percpu_coERR_PT"sref">S_ISDIRerr)
 83510="l>10=     ="fs/ext4/ialloc.c#L843" id="10=60" clas10="line" name="L836"> 83610="l>10=     "fs/ext4/ialloc.c#L855" id="10=70" clas10="line" name="L837"> 83710="l>10=     unsigned longm+code=ext4_group_descss="ees);
<"sref">bg_flags<_groucss="ees);
<"ref=" href="+code=ext4_grousu/a>)bp" csref">sb);
)bp" chreff=+code=sbi" clas="sref">sb,  83810="l>10=     ="fs/ext4/ialloc.c#L848" id="10390" clas10="line" name="L839"> 83910="l>10=             unsigned longm+code=ext4_grou
<"class="sref">ext4_free
<"class="href="fs/ext4/ialloc.c#L855" id="10490" clas10="line" name="L840"> 84010="l>10="             href="+code=ext4_group_infa> bg_flags<_groua> group d" hre="fs/ext4/ialloc.c#L855" id="10=10" clas10="line" name="L841"> 84110="l>10=    ext4_group_t sbi-& href="+code=group" clna> bg_flags ext4_freele_dig="_a> sb,  84210="l>10=2   <#ifdefr+code=inode" clES_PFS_DEBUGsref">S_ISDIR 84310="l>10=3             href="+code=ext4_group_infsu/a>)bp" csref">sb);
p_infsu/a>)bp" chreff=+code=sbi" clas<"sref">bg_flags<_s hre="fs/ext4/ialloc.c#L855" id="10=40" clas10="line" name="L844"> 84410="l>10=4            unsigned longm+code=ext4_grou,
ext4_free,
ext4_freex hre="fs/ext4/ialloc.c#L855" id="10=50" clas10="line" name="L845"> 84510="l>10=5             href="+code=ext4_groubuffa>)hs="sref">up_read)hs="hreff=+code=sbi" clas" class="sref">inode_bit,
NULL,  84610="l>10=     "fs/ext4/ialloc.c#L855" id="10470" clas10="line" name="L847"> 84710="l>10=            <+code=inode" cls"sref">bg_flags<_s href="+code=EXT4_INODES_PESBsref">GRPIDT_INOSBref="+code=inode" cl="sref">sb);
free_inodou="href="fs/ext4/ialloc.c#L855" id="10480" clas10="line" name="L848"> 84810="l>10=    ext4_free
<"class="hreff="f="fs/ext4/ialloc.c#L800" id="10490" clas10="line" name="L849"> 84910="l>10=             +code=ext4_unlob/a>,
ext4_free,
 85010="l>10="            +code=ext4_unlogd"sref">group d" href="+code=ino" classs="sref">NULL,  85110="l>10=    sbi-& hreff="f="+code=f" class="sref">sbi-& href &l="m+code=ext4_grouna> bg_flags sbi-& href++=f="fs/ext4/ialloc.c#L848" id="10520" clas10="line" name="L852"> 85210="l>10=            group d" href="+code=ino" clasle_dig="_a> bg_flags<_groua="_a> sb, sbi-& href="+code=group" clss="sref">NULL,  85310="l>10=            group d" hre="fs/ext4/ialloc.c#L788" id="10540" clas10="line" name="L854"> 85410="l>10=                    < href=" continue="fs/ext4/ialloc.c#L855" id="10550" clas10="line" name="L855"> 85510="l>10=            ext4_free
<"class="hreff+="+code=ino" clasle_dies);
<"lass="sref">ext4_freele_dies);
<"lass="ref="+code=sb" class="sref">sb, group d" hre=="fs/ext4/ialloc.c#L855" id="10560" clas10="line" name="L756"> 75610="l>10=                    <+code=ino" clasbrref=sref">ext4_groubrref=ref="+code=inode" cl" class="sref">inode_bit,
 75710="l>10=            if (inode_bit,
ext4_group_tsb, sbi-& href=="fs/ext4/ialloc.c#L800" id="10580" clas10="line" name="L758"> 75810="l>10=            inode_bit,
 75910="l>10=                     76010="l>10="    "fs/ext4/ialloc.c#L855" id="10610" clas10="line" name="L761"> 76110="l>10=            }
ext4_freex href="+code=ext4_flex_groucss="eesbg_flags<_groucss="eesinode_bit,
ext4_handb,
 76210="l>10=            EXT4_INODES_PER_GROUP(sb);
 76310="l>10=            S_ISDIRS_ISDIR"call ext4a>  76410="l>10=                    < href=" (unsigned long)"+code=f" class="sref">sbi-& href="+code=group" clle_dies);
<"lass="sref">ext4_freele_dies);
<"lass="ref="+code=sb" class="sref">sb, group d" hre=="+code=group" clxsref">ext4_freex hre=="fs/ext4/ialloc.c#L800" id="10650" clas10="line" name="L765"> 76510="l>10=            ,
ext4_free,
ext4_freex hre="fs/ext4/ialloc.c#L855" id="10660" clas10="line" name="L766"> 76610="l>10=    if ( 76710="l>10=            <+code=inode" clbrref=sref">ext4_groubrref=ref="+code=inode" cl" class="sref">inode_bit,
 76810="l>10=    S_ISDIRS_ISDIR"call ext4_groucss="ees);
<": pan>);
 76910="l>10=                    +s="string">"call ext4 hored ="%u, csmpu"ed ="%lu,"%lu\npan>);
 77010="l>10="                   +code=sb" class~<="/a>(cpusref">i_ino~<="/a>(cpuref="+code=inode" cls"sref">bg_flags<_s hreref="+code=s_flex_groues);
<"lass="sref">ext4_freeoues);
<"lass=" hre=="+code=group" cl
<"class="sref">ext4_free
<"class="href="+code=free" clab classass="sref">ext4_free,
 77110="l>10=            }r="urn"+code=percpu_co
<"class="sref">ext4_free
<"class="href="fs/ext4/ialloc.c#L855" id="10720" clas10="line" name="L772"> 77210="l>10=2   <#ref="fs/ext4/ialloc.c#L855" id="10730" clas10="line" name="L773"> 77310="l>10=    ext4_free
<"class="hreff="f="fs/ext4/ialloc.c#L800" id="10740" clas10="line" name="L774"> 77410="l>10=             ass="+code=inode" clasref">sbi-& hreff="f="+code=f" class="sref">sbi-& href &l="m+code=ext4_grouna> bg_flags sbi-& href++=f="fs/ext4/ialloc.c#L848" id="10750" clas10="line" name="L775"> 77510="l>10=            group d" href="+code=ino" clasle_dig="_a> bg_flags<_groua="_a> sb, sbi-& href="+code=group" clss="sref">NULL,  77610="l>10=                    group d" hre="fs/ext4/ialloc.c#L788" id="10770" clas10="line" name="L777"> 77710="l>10=            if ( 77810="l>10=            ext4_free
<"class="hreff+="+code=ino" clasle_dies);
<"lass="sref">ext4_freele_dies);
<"lass="ref="+code=sb" class="sref">sb, group d" hre=="fs/ext4/ialloc.c#L855" id="10790" clas10="line" name="L779"> 77910="l>10=            i_gidcond_r<"che"ref="=="fs/ext4/ialloc.c#L855" id="10890" clas10="line" name="L780"> 78010="l>10="   if ( 78110="l>10=            }r="urn"+code=percpu_co
<"class="sref">ext4_free
<"class="href="fs/ext4/ialloc.c#L855" id="10820" clas10="line" name="L782"> 78210="l>10=2   <#rndif"fs/ext4/ialloc.c#L855" id="10830" clas10="line" name="L783"> 78310="l>10=    <="fs/ext4/ialloc.c#L843" id="10840" clas10="line" name="L784"> 78410="l>10=href="fs/ext4/ialloc.c#L835" id="10=50" clas10="line" name="L785"> 78510="l>10=     +s="comment">/* This is tC835ed at mss="-time, su/a>-bp" cptimp" ced * 78610="l>10=     unsigned longm+code=ext4_group_descss="edir"sref">bg_flags<_groucss="edir"ref=" href="+code=ext4_grousu/a>)bp" csref">sb);
)bp" chreff="+code=ext4_grous"sref">sb,  78710="l>10=     ="fs/ext4/ialloc.c#L848" id="10880" clas10="line" name="L788"> 78810="l>10=            ext4_freeass="hreff="f="fs/ext4/ialloc.c#L800" id="10890" clas10="line" name="L789"> 78910="l>10=             +code=ext4_unlosgrouclass="sref">ext4_group_t sbi-& href="+code=group" clna> bg_flags ext4_freele_dig="_a> sb,  79010="l>10="ref="fs/ext4/ialloc.c#L835" id="10910" clas10="line" name="L791"> 79110="l>10=    sbi-& hreff="f="+code=f" class="sref">sbi-& href &l="m+code=ext4_grouna> bg_flags sbi-& href++=f="fs/ext4/ialloc.c#L848" id="10920" clas10="line" name="L792"> 79210="l>10=             bg_flags<_groua> group d" href="+code=ino" clasle_dig="_a> bg_flags<_groua="_a> sb, sbi-& href="+code=group" clss="sref">NULL,  79310="l>10=            group d" hre="fs/ext4/ialloc.c#L788" id="10940" clas10="line" name="L794"> 79410="l>10=                    < href=" continue="fs/ext4/ialloc.c#L855" id="10950" clas10="line" name="L795"> 79510="l>10=            ext4_freeass="hreff+="+code=ino" clasle_diusededir"lass="sref">ext4_freele_diusededir"lass="ref="+code=sb" class="sref">sb, group d" hre=="fs/ext4/ialloc.c#L855" id="10960" clas10="line" name="L796"> 79610="l>10=    if ( 79710="l>10=            ir="urn"+code=percpu_coass="sref">ext4_freeass="href="fs/ext4/ialloc.c#L855" id="10980" clas10="line" name="L798"> 79810="l>10=8   <="fs/ext4/ialloc.c#L843" id="10990" clas10="line" name="L799"> 79910="l>10=href="fs/ext4/ialloc.c#L830" id="11090" clas11090"ne" name="L799"> 79911090>1109    ss="comment">         
 791110"l>1101    ss="comment">          * Zeroes not yet zeroed s=" int8blin- just wr="e zeroes th>  792110"l>1102    ss="comment">          * s=" int8bli. Must be ca35ed without any spiup 793110"l>110n class="comment">          * wh rinitptimca35ed arom on active part of filesystemptimoc.clazy>)="a href="fs/ext4/ialloc.c#L802" id="11040" clas110"line" name="L794"> 794110"l>110     ss="comment">          * th>ea<, sorwe do not need any specL80mp" cs, howeverrwe havinto preven"a href="fs/ext4/ialloc.c#L802" id="11050" clas110"line" name="L795"> 795110"l>110     +s="comment">/* This i * s=" in802" ationearom al Icurrhis a>  796110"l>110    i+s="comment">/* This i * bp" cple_dinewa>);
<())=shed.a href="fs/ext4/ialloc.c#L803" id="11070" clas110"line" name="L797"> 797110"l>110     +s="comment">/* This i * 798110"l>110    )="tmap_cst8blisref">ext4_freele_di>)="tmap_cst8bliref=" href="+code=ext4_grousu/a>)bp" csref">sb);
)bp" chreff=+code=sb" class="sref">sb, ext4_group_t ext4_unloass=" hre="fs/ext4/ialloc.c#L800" id="11090" clas110"line" name="L799"> 799110"l>110                    err =barrie" hre="fs/ext4/ialloc.c#L788" id="11190" clas11="line" name="L810"> 81011="l>11="ref=="fs/ext4/ialloc.c#L848" id="11110" clas11="line" name="L811"> 81111="l>111     i_inop_infa> ext4_unloas" href="+code=ino" clasle_dig="_a> i_inop_infa="_a> sb, ext4_unloass=" hre=="fs/ext4/ialloc.c#L855" id="11=20" clas11="line" name="L812"> 81211="l>11=2   i_inop_infsb inf"hreff=+code=sb" class=""sref">sbi-&="" href="+code=ino" clasES_PESBsref">GRPIDT_INOSBref="+code=inode" cl="sref">sb);
 81311="l>1113             href="+code=ext4_group_infa> bg_flags<_groua> group d" href="+code=ino" classs="sref">NULL,  81411="l>1114             href="+code=ext4_groubuffa>)hs="sref">up_read)hs="hreff=+code=sbi" clasa> inode_bita>  81511="l>11=    ext4_grouhandle="hreff=+code=sbi" clashandlesref">ext4_grouhandlehref="fs/ext4/ialloc.c#L855" id="11=60" clas11="line" name="L816"> 81611="l>11=    ext4_group_tup_read 81711="l>11=            ien="+code=ext4_grounumsref">bg_flagsext4_grour="ref=f="0="+code=f" class=usedeblk"sref">bg_flags 81811="l>111href="fs/ext4/ialloc.c#L839" id="11190" clas11="line" name="L819"> 81911="l>11=             +s="comment">/* This is tThtimshould not happen, but just to be sureomclea this * 82011="l>11="   if (sb);
bg_flags &= bg_flags 82111="l>11=            }
ext4_grour="ref=f="1="fs/ext4/ialloc.c#L800" id="11220" clas11="line" name="L822"> 82211="l>11=            ext4_grouou"href="fs/ext4/ialloc.c#L855" id="11230" clas11="line" name="L823"> 82311="l>11=            <="fs/ext4/ialloc.c#L843" id="11240" clas11="line" name="L824"> 82411="l>112href="fs/ext4/ialloc.c#L835" id="11250" clas11="line" name="L825"> 82511="l>112    group d" href="+code=ino" clasle_dig="_a> bg_flags<_groua="_a> sb, ext4_unloass=" hre=ahref=+code=sbi" clasa> inode_bita>  82611="l>112    if (group d" hre="fs/ext4/ialloc.c#L788" id="11270" clas11="line" name="L827"> 82711="l>11=            if (ext4_grouou"href="fs/ext4/ialloc.c#L855" id="11280" clas11="line" name="L828"> 82811="l>112href="fs/ext4/ialloc.c#L839" id="11290" clas11="line" name="L829"> 82911="l>112             +s="comment">/* This is a href="fs/ext4/ialloc.c#L789" id="11390" clas11="line" name="L830"> 83011="l>1139    ss="comment">                 **dWe do not need f="p" cpthis, becauseto uare tl IOnly onea href="fs/ext4/ialloc.c#L802" id="11=10" clas11="line" name="L831"> 83111="l>1131    ss="comment">                 **dhandlingmusis  &am.a href="fs/ext4/ialloc.c#L803" id="11=20" clas11="line" name="L832"> 83211="l>1132    ss="comment">                 ** 83311="l>113    if (group d" hreref="+code=i_gid" clbguess="sref">bg_flags(le="ref="+code=sb" classT_INOBGER_GRO_ZEROEDsref">GRPIDT_INOBGER_GRO_ZEROED hre=="fs/ext4/ialloc.c#L788" id="11340" clas11="line" name="L834"> 83411="l>113                    ext4_grouou"href="fs/ext4/ialloc.c#L855" id="11=50" clas11="line" name="L835"> 83511="l>1135ref="fs/ext4/ialloc.c#L788" id="11=60" clas11="line" name="L836"> 83611="l>113    ext4_grouhandlehreff="+code=ino" clasle_dijournal_start_="sref">sb, sb,  83711="l>1137   if (S_ISDIRext4_grouhandlehref)ff="fs/ext4/ialloc.c#L848" id="11380" clas11="line" name="L838"> 83811="l>113            ext4_grour="ref=f="+code=inode" clPTR_ER"sref">S_ISDIRext4_grouhandlehref)="fs/ext4/ialloc.c#L855" id="11=90" clas11="line" name="L839"> 83911="l>113                    ext4_grouou"href="fs/ext4/ialloc.c#L855" id="11490" clas11="line" name="L840"> 84011="l>114"   if ( 84111="l>11=    <"fs/ext4/ialloc.c#L843" id="11=20" clas11="line" name="L842"> 84211="l>1142   ext4_groudown_wr="eref="href=+code=sbi" clasa>"sref">ext4_unloas" hreref="+code=i_gid" cl802" _semsref">ext4_unlo802" _semhref)="fs/ext4/ialloc.c#L855" id="11430" clas11="line" name="L843"> 84311="l>11=3            +s="comment">/* This is a href="fs/ext4/ialloc.c#L789" id="11=40" clas11="line" name="L844"> 84411="l>114     ss="comment">                 **dIfdber incess&quwas alrs="y >)="L78ized fh rinmay be somea href="fs/ext4/ialloc.c#L802" id="11=50" clas11="line" name="L845"> 84511="l>114     +s="comment">/* This i        **duseddber is sorwe need f="skipmbp" csrwithduseddber is ina href="fs/ext4/ialloc.c#L802" id="11=60" clas11="line" name="L846"> 84611="l>114    i+s="comment">/* This i        **ds=" int8bli.a href="fs/ext4/ialloc.c#L802" id="11=70" clas11="line" name="L847"> 84711="l>114     +s="comment">/* This i        ** 84811="l>11=    group d" hreref="+code=i_gid" clbguess="sref">bg_flags(le="ref="+code=sb" classT_INOBGER_GRO_UNINITsref">GRPIDT_INOBGER_GRO_UNINIThref)f="fs/ext4/ialloc.c#L788" id="11490" clas11="line" name="L849"> 84911="l>114            bg_flagsEXT4_INODDIV_ROUND_="ref=""+code=sb" classT_INOR_GROUP" class="sref">EXT4_INODES_PER_GROUP(sb);
 85011="l>115"                       t8bli_unusedeass="sref">ext4_freele_di>t8bli_unusedeass="ref="+code=sb" class="sref">sb, group d" hre=)="fs/ext4/ialloc.c#L800" id="11510" clas11="line" name="L851"> 85111="l>115            }
sbi-&="" hreref="+code=s_flex_grou>);
<"l/a>)bp" csref">sb);
);
<"l/a>)bp" chref)="fs/ext4/ialloc.c#L855" id="11520" clas11="line" name="L852"> 85211="l>11=     "fs/ext4/ialloc.c#L855" id="11530" clas11="line" name="L853"> 85311="l>115    if (bg_flagsbg_flagssbi-&="" hreref="+code=s_flex_grou>tbl/a>)ass="sref">ext4_unloou>tbl/a>)ass="href)ff="fs/ext4/ialloc.c#L848" id="11540" clas11="line" name="L854"> 85411="l>11=                    <+code=inode" clle_dierr)
sb, "call ext4Somethingmisrwrongmwithda> );
 85511="l>11=            "call ext4useddbt8blinbp" cs:"%<; pan>);
 75611="l>11=                    <          <+s="string">"call ext4bt8blinunused css=":"%upan>);
 75711="l>11=            if (ext4_unloass=" hre=a+code=ext4_has_usedeblk"sref">bg_flags 75811="l>11=            t8bli_unusedeass="sref">ext4_freele_di>t8bli_unusedeass="ref="+code=sb" class="sref">sb, group d" hre=)="fs/ext4/ialloc.c#L855" id="11590" clas11="line" name="L759"> 75911="l>11=                    <+code=ext4_unlor="sref">ext4_grour="ref=f="1="fs/ext4/ialloc.c#L800" id="11690" clas11="line" name="L760"> 76011="l>116"                    ref="+code=fail" claext4_grou 76111="l>116            }="fs/ext4/ialloc.c#L843" id="11620" clas11="line" name="L762"> 76211="l>116     "fs/ext4/ialloc.c#L855" id="11630" clas11="line" name="L763"> 76311="l>116    up_readext4_freele_di>)p_cst8bliref="+code=sb" class="sref">sb, group d" hre= +a+code=ext4_has_usedeblk"sref">bg_flags 76411="l>11=             +code=ext4_grounumsref">bg_flagssbi-&="" hreref="+code=s_flex_grou>tbl/a>)ass="sref">ext4_unloou>tbl/a>)ass="href -a+code=ext4_has_usedeblk"sref">bg_flags 76511="l>1165ref="fs/ext4/ialloc.c#L788" id="11660" clas11="line" name="L766"> 76611="l>116    TRACEsref">S_ISDIRTRACEref="+code=sb" classa> inode_bita> "call ext4a="_wr="e_accesspan>);
 76711="l>11=            <+code=inode" clr="sref">ext4_grour="ref=f="+code=inode" clle_dijournal_a="_wr="e_accesssref">sb, ext4_grouhandlehref="fs/ext4/ialloc.c#L800" id="11680" clas11="line" name="L768"> 76811="l>116            inode_bita>  76911="l>11=             ef="+code=ext4_has_r="sref">ext4_grour="ref=="fs/ext4/ialloc.c#L788" id="11790" clas11="line" name="L770"> 77011="l>11="                    ref="+code=fail" claext4_grou 77111="l>117    <"fs/ext4/ialloc.c#L843" id="11720" clas11="line" name="L772"> 77211="l>1172   /* This is a href="fs/ext4/ialloc.c#L789" id="11730" clas11="line" name="L773"> 77311="l>117n class="comment">                  * Skipmzeroout ef=tl Is=" int8blinis  ull. But we set=tl IZEROED hhref="fs/ext4/ialloc.c#L789" id="11740" clas11="line" name="L774"> 77411="l>117     ss="comment">                 **dess= anyway, becausetobviously, whennitptim ullnitpdoes not need hhref="fs/ext4/ialloc.c#L789" id="11750" clas11="line" name="L775"> 77511="l>117     +s="comment">/* This i        **dfurfh rmzerot;c.a href="fs/ext4/ialloc.c#L802" id="11760" clas11="line" name="L776"> 77611="l>117    i+s="comment">/* This i        ** 77711="l>1177   if (bg_flagsbg_flags 77811="l>11=            ext4_unlookip_zeroouthref="fs/ext4/ialloc.c#L855" id="11790" clas11="line" name="L779"> 77911="l>117href="fs/ext4/ialloc.c#L830" id="11890" clas11="line" name="L780"> 78011="l>11="   if (ext4_group_t"call ext4aoingmuomzero out e=" int8blininda> );
 78111="l>118            }
ext4_unloass=" href="fs/ext4/ialloc.c#L855" id="11820" clas11="line" name="L782"> 78211="l>1182   ext4_grour="ref=f="+code=inode" clsb issue_zerooutsref">ext4_unloob issue_zerooutref="+code=sb" class="sref">sb, up_readbg_flagsbg_flags 78311="l>118    if (ext4_grour="ref=f&l="m0)"fs/ext4/ialloc.c#L855" id="11840" clas11="line" name="L784"> 78411="l>118                    ext4_grou 78511="l>1185   if (err =barrie" hre="fs/ext4/ialloc.c#L788" id="11860" clas11="line" name="L786"> 78611="l>118                    <+code=ino" clasblkdev issue_flus"sref">inode_bitsb, ext4_unlooubdevhref="+code=f" class=GFP_NOFSsref">bg_flagsNULL,  78711="l>11=     "fs/ext4/ialloc.c#L855" id="11880" clas11="line" name="L788"> 78811="l>11=     +code=fail" claskip_zerooutsref">ext4_unlookip_zeroouthref:"fs/ext4/ialloc.c#L855" id="11890" clas11="line" name="L789"> 78911="l>11=             +code=ext4_unlosgroup" c)ass="sref">ext4_unlosgroup" c)ass="ref="+code=sb" class="sref">sb, ext4_unloass=" href="fs/ext4/ialloc.c#L855" id="11990" clas11="line" name="L790"> 79011="l>119"            +code=ext4_unlogd"sref">group d" hreref="+code=i_gid" clbguess="sref">bg_flags(le="line" nam4_freeapu/a>(le="ref="+code=sb" classT_INOBGER_GRO_ZEROEDsref">GRPIDT_INOBGER_GRO_ZEROED hre=="fs/ext4/ialloc.c#L855" id="11910" clas11="line" name="L791"> 79111="l>119    ext4_grousgrouclass=
<"clasum_s="ref="+code=sb" class="sref">sb, ext4_unloass=" hre="+code=f" class=gd"sref">group d" hre=="fs/ext4/ialloc.c#L855" id="11920" clas11="line" name="L792"> 79211="l>1192   ext4_unlosgrouunp" c)ass="ref="+code=sb" class="sref">sb, ext4_unloass=" href="fs/ext4/ialloc.c#L855" id="11930" clas11="line" name="L793"> 79311="l>11=     "fs/ext4/ialloc.c#L855" id="11940" clas11="line" name="L794"> 79411="l>119             +code=ext4_grouBUFF/a>TRACEsref">S_ISDIRTRACEref="+code=sb" classa> inode_bita>  79511="l>11=            "call ext4ca35ple_dihandle=dirty_meta
);
 79611="l>119    ext4_grour="ref=f="+code=inode" clle_dihandle=dirty_meta
ext4_unlosgrouhandle=dirty_meta
ext4_grouhandlehref="+code=group" clss="sref">NULL,  79711="l>119            if (inode_bita>  79811="l>119href="fs/ext4/ialloc.c#L839" id="11990" clas11="line" name="L799"> 79911="l>11=href=+code=fail" claext4_grou 79912090>120"            +code=ext4_unloext4_grou"sref">ext4_unloas" hreref="+code=i_gid" cl802" _semsref">ext4_unlo802" _semhref)="fs/ext4/ialloc.c#L855" id="12010" clas120"line" name="L791"> 791120"l>120    ext4_unlosgroujournal_sto"ref="+code=inode" clhandlesref">ext4_grouhandlehref)="fs/ext4/ialloc.c#L855" id="12020" clas120"line" name="L792"> 792120"l>1202    scode=inode" clou"sref">ext4_grouou"href:"fs/ext4/ialloc.c#L855" id="12030" clas120"line" name="L793"> 793120"l>120    if (ext4_grour="ref=="fs/ext4/ialloc.c#L855" id="12040" clas120"line" name="L794"> 794120"l>120     ="fs/ext4/ialloc.c#L843" id="12050" clas120"line" name="L795"> 795120"l>120     +/pre +/div>


+/div>


Tl IOriginal LXR software by=tl Ifs/ext4/ihttp://sourceforge.net/projects/lx"s>LXR /* Tunityhref="usis experiThisal versioneby=fs/ext4/imailto:lx"@e="ux.no">lx"@e="ux.nohref.
+/div>

lx".e="ux.no kindly hos"ed by=fs/ext4/ihttp://www.redpill-e="pro.no">Redpill L="pro AS hre="provider of L="ux consultingmand operations servicis since 1=h5.
+/div>