linux/fs/ocfs2/localalloc.c
<<
>>
Prefs
   1/* -*- mode: c; c-basic-offset: 8; -*-
   2 * vim: noexpandtab sw=8 ts=8 sts=0:
   3 *
   4 * localalloc.c
   5 *
   6 * Node local data allocation
   7 *
   8 * Copyright (C) 2002, 2004 Oracle.  All rights reserved.
   9 *
  10 * This program is free software; you can redistribute it and/or
  11 * modify it under the terms of the GNU General Public
  12 * License as published by the Free Software Foundation; either
  13 * version 2 of the License, or (at your option) any later version.
  14 *
  15 * This program is distributed in the hope that it will be useful,
  16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18 * General Public License for more details.
  19 *
  20 * You should have received a copy of the GNU General Public
  21 * License along with this program; if not, write to the
  22 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  23 * Boston, MA 021110-1307, USA.
  24 */
  25
  26#include <linux/fs.h>
  27#include <linux/types.h>
  28#include <linux/slab.h>
  29#include <linux/highmem.h>
  30#include <linux/bitops.h>
  31
  32#include <cluster/masklog.h>
  33
  34#include "ocfs2.h"
  35
  36#include "alloc.h"
  37#include "blockcheck.h"
  38#include "dlmglue.h"
  39#include "inode.h"
  40#include "journal.h"
  41#include "localalloc.h"
  42#include "suballoc.h"
  43#include "super.h"
  44#include "sysfile.h"
  45#include "ocfs2_trace.h"
  46
  47#include "buffer_head_io.h"
  48
  49#define OCFS2_LOCAL_ALLOC(dinode)       (&((dinode)->id2.i_lab))
  50
  51static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc);
  52
  53static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb,
  54                                             struct ocfs2_dinode *alloc,
  55                                             u32 *numbits,
  56                                             struct ocfs2_alloc_reservation *resv);
  57
  58static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc);
  59
  60static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
  61                                    handle_t *handle,
  62                                    struct ocfs2_dinode *alloc,
  63                                    struct inode *main_bm_inode,
  64                                    struct buffer_head *main_bm_bh);
  65
  66static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb,
  67                                                struct ocfs2_alloc_context **ac,
  68                                                struct inode **bitmap_inode,
  69                                                struct buffer_head **bitmap_bh);
  70
  71static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb,
  72                                        handle_t *handle,
  73                                        struct ocfs2_alloc_context *ac);
  74
  75static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
  76                                          struct inode *local_alloc_inode);
  77
  78/*
  79 * ocfs2_la_default_mb() - determine a default size, in megabytes of
  80 * the local alloc.
  81 *
  82 * Generally, we'd like to pick as large a local alloc as
  83 * possible. Performance on large workloads tends to scale
  84 * proportionally to la size. In addition to that, the reservations
  85 * code functions more efficiently as it can reserve more windows for
  86 * write.
  87 *
  88 * Some things work against us when trying to choose a large local alloc:
  89 *
  90 * - We need to ensure our sizing is picked to leave enough space in
  91 *   group descriptors for other allocations (such as block groups,
  92 *   etc). Picking default sizes which are a multiple of 4 could help
  93 *   - block groups are allocated in 2mb and 4mb chunks.
  94 *
  95 * - Likewise, we don't want to starve other nodes of bits on small
  96 *   file systems. This can easily be taken care of by limiting our
  97 *   default to a reasonable size (256M) on larger cluster sizes.
  98 *
  99 * - Some file systems can't support very large sizes - 4k and 8k in
 100 *   particular are limited to less than 128 and 256 megabytes respectively.
 101 *
 102 * The following reference table shows group descriptor and local
 103 * alloc maximums at various cluster sizes (4k blocksize)
 104 *
 105 * csize: 4K    group: 126M     la: 121M
 106 * csize: 8K    group: 252M     la: 243M
 107 * csize: 16K   group: 504M     la: 486M
 108 * csize: 32K   group: 1008M    la: 972M
 109 * csize: 64K   group: 2016M    la: 1944M
 110 * csize: 128K  group: 4032M    la: 3888M
 111 * csize: 256K  group: 8064M    la: 7776M
 112 * csize: 512K  group: 16128M   la: 15552M
 113 * csize: 1024K group: 32256M   la: 31104M
 114 */
 115#define OCFS2_LA_MAX_DEFAULT_MB 256
 116#define OCFS2_LA_OLD_DEFAULT    8
 117unsigned int ocfs2_la_default_mb(struct ocfs2_super *osb)
 118{
 119        unsigned int la_mb;
 120        unsigned int gd_mb;
 121        unsigned int la_max_mb;
 122        unsigned int megs_per_slot;
 123        struct super_block *sb = osb->sb;
 124
 125        gd_mb = ocfs2_clusters_to_megabytes(osb->sb,
 126                8 * ocfs2_group_bitmap_size(sb, 0, osb->s_feature_incompat));
 127
 128        /*
 129         * This takes care of files systems with very small group
 130         * descriptors - 512 byte blocksize at cluster sizes lower
 131         * than 16K and also 1k blocksize with 4k cluster size.
 132         */
 133        if ((sb->s_blocksize == 512 && osb->s_clustersize <= 8192)
 134            || (sb->s_blocksize == 1024 && osb->s_clustersize == 4096))
 135                return OCFS2_LA_OLD_DEFAULT;
 136
 137        /*
 138         * Leave enough room for some block groups and make the final
 139         * value we work from a multiple of 4.
 140         */
 141        gd_mb -= 16;
 142        gd_mb &= 0xFFFFFFFB;
 143
 144        la_mb = gd_mb;
 145
 146        /*
 147         * Keep window sizes down to a reasonable default
 148         */
 149        if (la_mb > OCFS2_LA_MAX_DEFAULT_MB) {
 150                /*
 151                 * Some clustersize / blocksize combinations will have
 152                 * given us a larger than OCFS2_LA_MAX_DEFAULT_MB
 153                 * default size, but get poor distribution when
 154                 * limited to exactly 256 megabytes.
 155                 *
 156                 * As an example, 16K clustersize at 4K blocksize
 157                 * gives us a cluster group size of 504M. Paring the
 158                 * local alloc size down to 256 however, would give us
 159                 * only one window and around 200MB left in the
 160                 * cluster group. Instead, find the first size below
 161                 * 256 which would give us an even distribution.
 162                 *
 163                 * Larger cluster group sizes actually work out pretty
 164                 * well when pared to 256, so we don't have to do this
 165                 * for any group that fits more than two
 166                 * OCFS2_LA_MAX_DEFAULT_MB windows.
 167                 */
 168                if (gd_mb > (2 * OCFS2_LA_MAX_DEFAULT_MB))
 169                        la_mb = 256;
 170                else {
 171                        unsigned int gd_mult = gd_mb;
 172
 173                        while (gd_mult > 256)
 174                                gd_mult = gd_mult >> 1;
 175
 176                        la_mb = gd_mult;
 177                }
 178        }
 179
 180        megs_per_slot = osb->osb_clusters_at_boot / osb->max_slots;
 181        megs_per_slot = ocfs2_clusters_to_megabytes(osb->sb, megs_per_slot);
 182        /* Too many nodes, too few disk clusters. */
 183        if (megs_per_slot < la_mb)
 184                la_mb = megs_per_slot;
 185
 186        /* We can't store more bits than we can in a block. */
 187        la_max_mb = ocfs2_clusters_to_megabytes(osb->sb,
 188                                                ocfs2_local_alloc_size(sb) * 8);
 189        if (la_mb > la_max_mb)
 190                la_mb = la_max_mb;
 191
 192        return la_mb;
 193}
 194
 195void ocfs2_la_set_sizes(struct ocfs2_super *osb, int requested_mb)
 196{
 197        struct super_block *sb = osb->sb;
 198        unsigned int la_default_mb = ocfs2_la_default_mb(osb);
 199        unsigned int la_max_mb;
 200
 201        la_max_mb = ocfs2_clusters_to_megabytes(sb,
 202                                                ocfs2_local_alloc_size(sb) * 8);
 203
 204        trace_ocfs2_la_set_sizes(requested_mb, la_max_mb, la_default_mb);
 205
 206        if (requested_mb == -1) {
 207                /* No user request - use defaults */
 208                osb->local_alloc_default_bits =
 209                        ocfs2_megabytes_to_clusters(sb, la_default_mb);
 210        } else if (requested_mb > la_max_mb) {
 211                /* Request is too big, we give the maximum available */
 212                osb->local_alloc_default_bits =
 213                        ocfs2_megabytes_to_clusters(sb, la_max_mb);
 214        } else {
 215                osb->local_alloc_default_bits =
 216                        ocfs2_megabytes_to_clusters(sb, requested_mb);
 217        }
 218
 219        osb->local_alloc_bits = osb->local_alloc_default_bits;
 220}
 221
 222static inline int ocfs2_la_state_enabled(struct ocfs2_super *osb)
 223{
 224        return (osb->local_alloc_state == OCFS2_LA_THROTTLED ||
 225                osb->local_alloc_state == OCFS2_LA_ENABLED);
 226}
 227
 228void ocfs2_local_alloc_seen_free_bits(struct ocfs2_super *osb,
 229                                      unsigned int num_clusters)
 230{
 231        spin_lock(&osb->osb_lock);
 232        if (osb->local_alloc_state == OCFS2_LA_DISABLED ||
 233            osb->local_alloc_state == OCFS2_LA_THROTTLED)
 234                if (num_clusters >= osb->local_alloc_default_bits) {
 235                        cancel_delayed_work(&osb->la_enable_wq);
 236                        osb->local_alloc_state = OCFS2_LA_ENABLED;
 237                }
 238        spin_unlock(&osb->osb_lock);
 239}
 240
 241void ocfs2_la_enable_worker(struct work_struct *work)
 242{
 243        struct ocfs2_super *osb =
 244                container_of(work, struct ocfs2_super,
 245                             la_enable_wq.work);
 246        spin_lock(&osb->osb_lock);
 247        osb->local_alloc_state = OCFS2_LA_ENABLED;
 248        spin_unlock(&osb->osb_lock);
 249}
 250
 251/*
 252 * Tell us whether a given allocation should use the local alloc
 253 * file. Otherwise, it has to go to the main bitmap.
 254 *
 255 * This function does semi-dirty reads of local alloc size and state!
 256 * This is ok however, as the values are re-checked once under mutex.
 257 */
 258int ocfs2_alloc_should_use_local(struct ocfs2_super *osb, u64 bits)
 259{
 260        int ret = 0;
 261        int la_bits;
 262
 263        spin_lock(&osb->osb_lock);
 264        la_bits = osb->local_alloc_bits;
 265
 266        if (!ocfs2_la_state_enabled(osb))
 267                goto bail;
 268
 269        /* la_bits should be at least twice the size (in clusters) of
 270         * a new block group. We want to be sure block group
 271         * allocations go through the local alloc, so allow an
 272         * allocation to take up to half the bitmap. */
 273        if (bits > (la_bits / 2))
 274                goto bail;
 275
 276        ret = 1;
 277bail:
 278        trace_ocfs2_alloc_should_use_local(
 279             (unsigned long long)bits, osb->local_alloc_state, la_bits, ret);
 280        spin_unlock(&osb->osb_lock);
 281        return ret;
 282}
 283
 284int ocfs2_load_local_alloc(struct ocfs2_super *osb)
 285{
 286        int status = 0;
 287        struct ocfs2_dinode *alloc = NULL;
 288        struct buffer_head *alloc_bh = NULL;
 289        u32 num_used;
 290        struct inode *inode = NULL;
 291        struct ocfs2_local_alloc *la;
 292
 293        if (osb->local_alloc_bits == 0)
 294                goto bail;
 295
 296        if (osb->local_alloc_bits >= osb->bitmap_cpg) {
 297                mlog(ML_NOTICE, "Requested local alloc window %d is larger "
 298                     "than max possible %u. Using defaults.\n",
 299                     osb->local_alloc_bits, (osb->bitmap_cpg - 1));
 300                osb->local_alloc_bits =
 301                        ocfs2_megabytes_to_clusters(osb->sb,
 302                                                    ocfs2_la_default_mb(osb));
 303        }
 304
 305        /* read the alloc off disk */
 306        inode = ocfs2_get_system_file_inode(osb, LOCAL_ALLOC_SYSTEM_INODE,
 307                                            osb->slot_num);
 308        if (!inode) {
 309                status = -EINVAL;
 310                mlog_errno(status);
 311                goto bail;
 312        }
 313
 314        status = ocfs2_read_inode_block_full(inode, &alloc_bh,
 315                                             OCFS2_BH_IGNORE_CACHE);
 316        if (status < 0) {
 317                mlog_errno(status);
 318                goto bail;
 319        }
 320
 321        alloc = (struct ocfs2_dinode *) alloc_bh->b_data;
 322        la = OCFS2_LOCAL_ALLOC(alloc);
 323
 324        if (!(le32_to_cpu(alloc->i_flags) &
 325            (OCFS2_LOCAL_ALLOC_FL|OCFS2_BITMAP_FL))) {
 326                mlog(ML_ERROR, "Invalid local alloc inode, %llu\n",
 327                     (unsigned long long)OCFS2_I(inode)->ip_blkno);
 328                status = -EINVAL;
 329                goto bail;
 330        }
 331
 332        if ((la->la_size == 0) ||
 333            (le16_to_cpu(la->la_size) > ocfs2_local_alloc_size(inode->i_sb))) {
 334                mlog(ML_ERROR, "Local alloc size is invalid (la_size = %u)\n",
 335                     le16_to_cpu(la->la_size));
 336                status = -EINVAL;
 337                goto bail;
 338        }
 339
 340        /* do a little verification. */
 341        num_used = ocfs2_local_alloc_count_bits(alloc);
 342
 343        /* hopefully the local alloc has always been recovered before
 344         * we load it. */
 345        if (num_used
 346            || alloc->id1.bitmap1.i_used
 347            || alloc->id1.bitmap1.i_total
 348            || la->la_bm_off)
 349                mlog(ML_ERROR, "Local alloc hasn't been recovered!\n"
 350                     "found = %u, set = %u, taken = %u, off = %u\n",
 351                     num_used, le32_to_cpu(alloc->id1.bitmap1.i_used),
 352                     le32_to_cpu(alloc->id1.bitmap1.i_total),
 353                     OCFS2_LOCAL_ALLOC(alloc)->la_bm_off);
 354
 355        osb->local_alloc_bh = alloc_bh;
 356        osb->local_alloc_state = OCFS2_LA_ENABLED;
 357
 358bail:
 359        if (status < 0)
 360                brelse(alloc_bh);
 361        if (inode)
 362                iput(inode);
 363
 364        trace_ocfs2_load_local_alloc(osb->local_alloc_bits);
 365
 366        if (status)
 367                mlog_errno(status);
 368        return status;
 369}
 370
 371/*
 372 * return any unused bits to the bitmap and write out a clean
 373 * local_alloc.
 374 *
 375 * local_alloc_bh is optional. If not passed, we will simply use the
 376 * one off osb. If you do pass it however, be warned that it *will* be
 377 * returned brelse'd and NULL'd out.*/
 378void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)
 379{
 380        int status;
 381        handle_t *handle;
 382        struct inode *local_alloc_inode = NULL;
 383        struct buffer_head *bh = NULL;
 384        struct buffer_head *main_bm_bh = NULL;
 385        struct inode *main_bm_inode = NULL;
 386        struct ocfs2_dinode *alloc_copy = NULL;
 387        struct ocfs2_dinode *alloc = NULL;
 388
 389        cancel_delayed_work(&osb->la_enable_wq);
 390        flush_workqueue(ocfs2_wq);
 391
 392        if (osb->local_alloc_state == OCFS2_LA_UNUSED)
 393                goto out;
 394
 395        local_alloc_inode =
 396                ocfs2_get_system_file_inode(osb,
 397                                            LOCAL_ALLOC_SYSTEM_INODE,
 398                                            osb->slot_num);
 399        if (!local_alloc_inode) {
 400                status = -ENOENT;
 401                mlog_errno(status);
 402                goto out;
 403        }
 404
 405        osb->local_alloc_state = OCFS2_LA_DISABLED;
 406
 407        ocfs2_resmap_uninit(&osb->osb_la_resmap);
 408
 409        main_bm_inode = ocfs2_get_system_file_inode(osb,
 410                                                    GLOBAL_BITMAP_SYSTEM_INODE,
 411                                                    OCFS2_INVALID_SLOT);
 412        if (!main_bm_inode) {
 413                status = -EINVAL;
 414                mlog_errno(status);
 415                goto out;
 416        }
 417
 418        mutex_lock(&main_bm_inode->i_mutex);
 419
 420        status = ocfs2_inode_lock(main_bm_inode, &main_bm_bh, 1);
 421        if (status < 0) {
 422                mlog_errno(status);
 423                goto out_mutex;
 424        }
 425
 426        /* WINDOW_MOVE_CREDITS is a bit heavy... */
 427        handle = ocfs2_start_trans(osb, OCFS2_WINDOW_MOVE_CREDITS);
 428        if (IS_ERR(handle)) {
 429                mlog_errno(PTR_ERR(handle));
 430                handle = NULL;
 431                goto out_unlock;
 432        }
 433
 434        bh = osb->local_alloc_bh;
 435        alloc = (struct ocfs2_dinode *) bh->b_data;
 436
 437        alloc_copy = kmalloc(bh->b_size, GFP_NOFS);
 438        if (!alloc_copy) {
 439                status = -ENOMEM;
 440                goto out_commit;
 441        }
 442        memcpy(alloc_copy, alloc, bh->b_size);
 443
 444        status = ocfs2_journal_access_di(handle, INODE_CACHE(local_alloc_inode),
 445                                         bh, OCFS2_JOURNAL_ACCESS_WRITE);
 446        if (status < 0) {
 447                mlog_errno(status);
 448                goto out_commit;
 449        }
 450
 451        ocfs2_clear_local_alloc(alloc);
 452        ocfs2_journal_dirty(handle, bh);
 453
 454        brelse(bh);
 455        osb->local_alloc_bh = NULL;
 456        osb->local_alloc_state = OCFS2_LA_UNUSED;
 457
 458        status = ocfs2_sync_local_to_main(osb, handle, alloc_copy,
 459                                          main_bm_inode, main_bm_bh);
 460        if (status < 0)
 461                mlog_errno(status);
 462
 463out_commit:
 464        ocfs2_commit_trans(osb, handle);
 465
 466out_unlock:
 467        brelse(main_bm_bh);
 468
 469        ocfs2_inode_unlock(main_bm_inode, 1);
 470
 471out_mutex:
 472        mutex_unlock(&main_bm_inode->i_mutex);
 473        iput(main_bm_inode);
 474
 475out:
 476        if (local_alloc_inode)
 477                iput(local_alloc_inode);
 478
 479        if (alloc_copy)
 480                kfree(alloc_copy);
 481}
 482
 483/*
 484 * We want to free the bitmap bits outside of any recovery context as
 485 * we'll need a cluster lock to do so, but we must clear the local
 486 * alloc before giving up the recovered nodes journal. To solve this,
 487 * we kmalloc a copy of the local alloc before it's change for the
 488 * caller to process with ocfs2_complete_local_alloc_recovery
 489 */
 490int ocfs2_begin_local_alloc_recovery(struct ocfs2_super *osb,
 491                                     int slot_num,
 492                                     struct ocfs2_dinode **alloc_copy)
 493{
 494        int status = 0;
 495        struct buffer_head *alloc_bh = NULL;
 496        struct inode *inode = NULL;
 497        struct ocfs2_dinode *alloc;
 498
 499        trace_ocfs2_begin_local_alloc_recovery(slot_num);
 500
 501        *alloc_copy = NULL;
 502
 503        inode = ocfs2_get_system_file_inode(osb,
 504                                            LOCAL_ALLOC_SYSTEM_INODE,
 505                                            slot_num);
 506        if (!inode) {
 507                status = -EINVAL;
 508                mlog_errno(status);
 509                goto bail;
 510        }
 511
 512        mutex_lock(&inode->i_mutex);
 513
 514        status = ocfs2_read_inode_block_full(inode, &alloc_bh,
 515                                             OCFS2_BH_IGNORE_CACHE);
 516        if (status < 0) {
 517                mlog_errno(status);
 518                goto bail;
 519        }
 520
 521        *alloc_copy = kmalloc(alloc_bh->b_size, GFP_KERNEL);
 522        if (!(*alloc_copy)) {
 523                status = -ENOMEM;
 524                goto bail;
 525        }
 526        memcpy((*alloc_copy), alloc_bh->b_data, alloc_bh->b_size);
 527
 528        alloc = (struct ocfs2_dinode *) alloc_bh->b_data;
 529        ocfs2_clear_local_alloc(alloc);
 530
 531        ocfs2_compute_meta_ecc(osb->sb, alloc_bh->b_data, &alloc->i_check);
 532        status = ocfs2_write_block(osb, alloc_bh, INODE_CACHE(inode));
 533        if (status < 0)
 534                mlog_errno(status);
 535
 536bail:
 537        if ((status < 0) && (*alloc_copy)) {
 538                kfree(*alloc_copy);
 539                *alloc_copy = NULL;
 540        }
 541
 542        brelse(alloc_bh);
 543
 544        if (inode) {
 545                mutex_unlock(&inode->i_mutex);
 546                iput(inode);
 547        }
 548
 549        if (status)
 550                mlog_errno(status);
 551        return status;
 552}
 553
 554/*
 555 * Step 2: By now, we've completed the journal recovery, we've stamped
 556 * a clean local alloc on disk and dropped the node out of the
 557 * recovery map. Dlm locks will no longer stall, so lets clear out the
 558 * main bitmap.
 559 */
 560int ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb,
 561                                        struct ocfs2_dinode *alloc)
 562{
 563        int status;
 564        handle_t *handle;
 565        struct buffer_head *main_bm_bh = NULL;
 566        struct inode *main_bm_inode;
 567
 568        main_bm_inode = ocfs2_get_system_file_inode(osb,
 569                                                    GLOBAL_BITMAP_SYSTEM_INODE,
 570                                                    OCFS2_INVALID_SLOT);
 571        if (!main_bm_inode) {
 572                status = -EINVAL;
 573                mlog_errno(status);
 574                goto out;
 575        }
 576
 577        mutex_lock(&main_bm_inode->i_mutex);
 578
 579        status = ocfs2_inode_lock(main_bm_inode, &main_bm_bh, 1);
 580        if (status < 0) {
 581                mlog_errno(status);
 582                goto out_mutex;
 583        }
 584
 585        handle = ocfs2_start_trans(osb, OCFS2_WINDOW_MOVE_CREDITS);
 586        if (IS_ERR(handle)) {
 587                status = PTR_ERR(handle);
 588                handle = NULL;
 589                mlog_errno(status);
 590                goto out_unlock;
 591        }
 592
 593        /* we want the bitmap change to be recorded on disk asap */
 594        handle->h_sync = 1;
 595
 596        status = ocfs2_sync_local_to_main(osb, handle, alloc,
 597                                          main_bm_inode, main_bm_bh);
 598        if (status < 0)
 599                mlog_errno(status);
 600
 601        ocfs2_commit_trans(osb, handle);
 602
 603out_unlock:
 604        ocfs2_inode_unlock(main_bm_inode, 1);
 605
 606out_mutex:
 607        mutex_unlock(&main_bm_inode->i_mutex);
 608
 609        brelse(main_bm_bh);
 610
 611        iput(main_bm_inode);
 612
 613out:
 614        if (!status)
 615                ocfs2_init_steal_slots(osb);
 616        if (status)
 617                mlog_errno(status);
 618        return status;
 619}
 620
 621/*
 622 * make sure we've got at least bits_wanted contiguous bits in the
 623 * local alloc. You lose them when you drop i_mutex.
 624 *
 625 * We will add ourselves to the transaction passed in, but may start
 626 * our own in order to shift windows.
 627 */
 628int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
 629                                   u32 bits_wanted,
 630                                   struct ocfs2_alloc_context *ac)
 631{
 632        int status;
 633        struct ocfs2_dinode *alloc;
 634        struct inode *local_alloc_inode;
 635        unsigned int free_bits;
 636
 637        BUG_ON(!ac);
 638
 639        local_alloc_inode =
 640                ocfs2_get_system_file_inode(osb,
 641                                            LOCAL_ALLOC_SYSTEM_INODE,
 642                                            osb->slot_num);
 643        if (!local_alloc_inode) {
 644                status = -ENOENT;
 645                mlog_errno(status);
 646                goto bail;
 647        }
 648
 649        mutex_lock(&local_alloc_inode->i_mutex);
 650
 651        /*
 652         * We must double check state and allocator bits because
 653         * another process may have changed them while holding i_mutex.
 654         */
 655        spin_lock(&osb->osb_lock);
 656        if (!ocfs2_la_state_enabled(osb) ||
 657            (bits_wanted > osb->local_alloc_bits)) {
 658                spin_unlock(&osb->osb_lock);
 659                status = -ENOSPC;
 660                goto bail;
 661        }
 662        spin_unlock(&osb->osb_lock);
 663
 664        alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
 665
 666#ifdef CONFIG_OCFS2_DEBUG_FS
 667        if (le32_to_cpu(alloc->id1.bitmap1.i_used) !=
 668            ocfs2_local_alloc_count_bits(alloc)) {
 669                ocfs2_error(osb->sb, "socal alloc  href1"+code=h_sync" class="sr1cfs2_g/a> * local allolass="sr1Is itlocs ss="co name="L655"> 655         642                    ="+code=m6in_bm_inode" class="sref6>main67AL_ALLOC_SYSTEM_INODE" class="sre(alloc->ae=id1" class="sref">id1.bitma_blk>status);
s" nam"L642"> 642                    =e=spin_un=status" class="sref">st6tus = -alloc->id1.bitmap1.i_used) !=
 642                    =calalloc.=mlog_errno" class="sref6>mlog6errno(ocfs2_local_alloc_count_bits(alloc)) {
 665
6utENOSPC;
 665
( 661        }
ocfs2_la_s"L662"> 662        mutex_6ock(&#endifL662"> 662         579        status6= ss="sref">alloc->id1.bitmap1.i_used) !=
 579        status6/a> &68ass="sref">ocfs2_get_system_file_inoss="sref">alloc->id1.bitmap1.i_used) !=
 661        }
osb-> 669                6ut_mutex;

 655        (ENOSPC;
 655        (alloc)) {
 661        }
handle6= ( 581                IS_ERR6/a>(<68>;
 631{
st6tus = status);
 646                gotoref="+cod6=handle" class="sref">ha6dle =  661        }
 662         651        ( 652
 652 652handle6><69alalloc.c#L655" id="L655" class="linhhhhhhhh* disocfs2localacalmment"> * lo55"irely. Re-ine" naame="L652"> 652 654status6= 
 655        ENOSPC;
 660                goto"+code=st6tus" class="sref">status6/a> &69 = osb) ||
 631{
 661        }
 601        ss="sref">alloc->id1.bitmap1.i_used) !=
 579        alloc->id1.bitmap1.i_used) !=
 661        }
out_unlock7
(osb-> 661        }
handle7>ocfs70AL_ALLOC_SYSTEM_INODE" class=localalloc.c#L661" id="L661" class="line" name="L661"> 661        }
 576
out_mutex:
7a hre70ame="L637"> 637        mute7_unlo7k(&bitmaalalloc.c#L640" id="L6a"line" name="a> =
 661        }
status7line"70de = 
 655        brelse7bitmaal {
ac)
slot_num);
 661        }
bitmaalwhic id="L543" class=alwhic name="a> =
 661        }
iput(b_datasb, "socal alloc  hr40" class="ls="sref">b_data;
 661        }
(&bitmaal" id="L543" class=ccfs2/localalloc.c#L566" i>, "socal alloc  hr40" class="ls="sref">b_data;
 661        }
out:
ENOSPC;
 661        }
statu7)7 614        if (!ocfs2_if="fs/ocfs2/localalloc.c#L581" id="L581" class="line" nam>)) {
 =
 581                status7/a>)
71href="+code=inode" class="sref">inodn_bm_inode" class="sref">main_bm_inode-> 650
main_bm_inode);
 661        }
sta7us 576
 576
(struct  576
(bitmaalmax_bde" class="sref">maaalmax_bde" ame="L576"> 576
slot_num);
 =
 646                got7"> * loca7 alloc. You lose them wh7n you72ame="L664"> 664         *
 617                 * We w7ll add ourselves to the 7ransa72rrno(status);
 646                got7"> * our 7wn in order to shift win7ows.<72href="+code=iocfs2/localalloc.c#L619" id="L619" class="line" name="L619"> 619}
 */
 576
 579        ocfs2_complete_local_alllaimstruct osb,
 629                   7         7     struct ocfs2_allloc.c#L629" id=sref">handle;
 629                   7 e=ocfs2_7.c#L632" id="L632" class7"line73AL_ALLOC_SYSTEM_INODE" class="sref">LO_context *ac)
 629                   7 calalloc7tus" class="sref">status7/a>;
73" class="sref">osb-> 630                   7ef="+code7ocfs2_dinode" class="sre7">ocf73rrno( 630                   7e> *inod7 73AL_ALLOC_SYSTEM_INODE" class= href="+cc.c#L631" id="Lbits_wanted,
 617                7ree_bi"L581"> 581                ocfs2_la_st2/localalloc.c#L633" id="L633" class="line" name="a> =
ac)
 619}
BUG_ON7!local_alloc_inode;
 635        unsigned in7ocalalloc7c#L639" id="L639" class=7line"73
 635        unsigned in7o        7lloc_inode" class="sref"7local7alloc_inodealloc;
 634        struct ocosb) ||
 665
 665
(&);
bitmaalwhic id="L543" class=alwhic name=!"a> =
 646                got7="+code=l7cal_alloc_inode" class="7ref">74ame="L664"> 664        st7tusbitmaalalloc.c#L640" id="L6a"line" name"L646"> 646                got7= *) osb->local_alloc_bh->b_data;
 665
 =
id1. 646                got7=e=BUG_ON7calalloc.c#L648" id="L647" cla74ame="L568"> 568         = ac)
(;
alloc)) {
sb, &ocalalloc.c#L597" id="L597" class="line" name="a href="fs/ocfs2/localloc.c#L630" id="L630" class="line" name="L630"> 630                   7de=mutex_7ock" class="sref">mutex_7ocku32 bitmaalresv.c#L640" id="L6a"lresvtmap="L646"> 646                got7ocalalloc7c#L651" id="L651" class=7line"75; 0) {
ac)
 581                
 655               7 * We must double check 7tate 75 = -ENOSPC;
 660                got7">       7 * another process may h7ve ch75rrno(status);
 646                got7">       7 */
 661        }
spin_lo7k75="line" name="L576"> 576
 637        7its_w75(& =
) !=
 661        }
spi7_unlock(&aoc.c#L631" id="Lss=_off" id="L630" class=_offame=_local_to_mainss="sref">alloc->/="L665" class="llname=-> =
ac)
 619}
st7tus = - 619}
 601        ocfs2_sync_local_to_main()) cs/oc="+c" class="sref">allocjourn>)) cs/oc="+e=id1" class="sref">5" id="L565" class="line" name="L629"> 629                   7de=spin_u7lock" class="sref">spin_7nlock76" class="sref">osb-> 629                   7d>       7c#L664" id="L664" class=7line"76rrno(local_alloc_bh->b_data;
 629                   7d>       7class="sref">alloc =7(stru76AL_ALLOC_SYSTEM_INODE" class= href="+cain_bm_inode" class="srlass="JOURN"L64CCESS_WRITE"L565" class="llass="JOURN"L64CCESS_WRITEname="L646"> 646                got7ocalalloc7c#L666" id="L666" class=7line"76sref">ocfs2_if="fs/ocfs2/localalloc.c#L581" id="L581" class="line" namm="L581"> 581                CO76href="+code=inode" class="sref">inodn="sref">status);
 646                got7"+code=le72_to_cpu" class="sref">l732_to76rrno( 661        }
 576
ocf76name=L576"> 576
osb_lock);
&ocalalloc.c#L597" 638" class="line" name1" class="sref">bitmaalresv.c#L640" id="L6a"lresvtmap"a> =
ac)
 629                   7="+code=m7in_bm_inode" class="sref7>main77AL_ALLOC_SYSTEM_INODE" class="sre=main_bm_bh" class="slloc.c#L630" id="L630" class="line" name=="L646"> 646                got7=e=spin_u7=status" class="sref">st7tus 613osb-> 617                7utac)
 =
 646                got7=calalloc7calalloc.c#L576" id="L577" cla77ame="L666"> 666#ifdef alloc->acfs2/b_lock" class="sref"id1.bitmap1.i_used) !=
 646                got7=+code=le7ock" class="sref">mutex_7ock(&allocjourn>))dirtye=id1" class="sref">5" id="L565" class="line" name="inode" class="sr"sref">local_alloc_bh->b_data;
 646                got7=+code=oc7c#L579" id="L579" class=7line"7name="L579"> 579        status7=  614        if (!status7/a> &78; 0) {
 617                status);
 646                got7 7ut_mutex;
ocfs2/localalloc.c#L619" id="L619" class="line" name="L619"> 619}
 576
 576
handle7= alloc)) {
alloc)) {
alloc;
 617                IS_ERR7/a>(<78>;
 581                st7tus(&,
 619}
ha7dle = osb) ||
 =
id1. 646                got7ref="+cod7=mlog_errno" class="sref7>mlog78name=L576"> 576
 =
/="L665" class="llname=-> =
alloc->ae=id1" class="sref">/="L665" class="llname=-> 646                got7s/ocfs2/l7calalloc.c#L592" id="L597" cla79AL_ALL665"> 665
(&)) {
)) {
href=s_wanted,
 646                got7s/ocfs2/l7/* we want the bitmap ch7nge t793_mutex;
ocfs2/localalloc.c#L61href=s_wanted,
 619}
handle7><79alall"L576"> 576
 666#ifdef status7= 
ine"icc">ocfs2_complete_local_al)) {
alloc)) {
osb,
 629                   7         7            alloc;
 629                   7 +code=oc7tus" class="sref">status7/a> &79 = ,
 629                   7 ef="+cod7=mlog_errno" class="sref7>mlog7errno(a#L62>alloc;
 629                   8ocalalloc8c#L601" id="L601" class=8line"8name=""L581"> 581                ocfs2_complete_loe" fref id="L668" classe" fref ame="a> =
 =
 =
);
 619}
ocfs2_complete_lo))resv.c#L640" id="L6))resvame=="a0"L661"> 661        }
out_unlock8
(a#L62>alloc;
 619}
handle8>ocfs80AL_ALLOC_SYSTvoid"oc.c#L631" id="Lss=maped) !=
 =
 619}
a#L62_mapb_lock);
a#L62_mapref="oc.c#L631" id="Lresmapb_lock);
&="ab_lock" class="sref">osb_lock);
&"L619"> 619}
status8a hre80ame="L637"> 637        mute8_unlo80pu(bitmap1.i_used) !=
 581                status8line"80unlock(& 619}
 661        }
 576
iput( 665
(& 581                out:
 619}
statu8)81
alloc;
 646                got8ref="+cod8=ocfs2_init_steal_slots"8class8"sref">ocfs2_iocfs2/loOSPC" class="sr"fs/ocresv_fe="typ">alloc;
 =
 646                got8r6ock" cl8tus" class="sref">status8/a>)
81href="+code=inode" class="sref">inodresv.c#L640" id="L6resvtmap="ab_lock" class="sref"r.c#L640" id="L6rame="L619"> 619}
 648
sta8us 579         619}
resmapb_lock);
&"a> =
 581                
 629                   8ocalalloc8sure we've got at le8st bi82 = - 619}
( 661        }
 *
 648
 * We w8ll add ourselves to the 8ransa82ame="L666"> 666#ifdef  * our 8wn in order to shift win8ows.<82href="+code=id id="L652" class="line" name="L652"> 652 */
 652 654 655         661        }
 665
status8/a>;
83" class="srefd id="L652" class="line" name="L652"> 652ocf83ged them while holding i_mutex.a#L62s ar  disocfs2. Hne" nlacislacalold"way" name="L654"> 654inod8 83alalloc.c#L655" id="L655" class="lin*" name="L655"> 655        83ame="L666"> 666#ifdef ) !=
 =
id1.) !=
 661        }
BUG_ON8! 568         =  *inod7 73AL> =
 650i5      unsigned in7o        7lloc_inode" class=8sref"83line81="+code=main_bm_bh" clef="fs/astzerstatus);
 619}
alloc->id1.bitmap1.i_used) !=
 619}
inod7 73AL> =
 =
 =
 581             8cfs2/7 ca8alloc7              inod7,
 581             8cmmen8ef="ode=l7cal_alloc_inode" c8ass="84ine"76rrno(i (%df ame/a>,aolasu, ref">i);ss="lin*" name="L655"> 655        st84stru76AL_ALLOC_SYSTEM_INODE" break=s2/l1"L619"> 619}
 *href=7=mlog_errno" class8"sref84lass8"sref">ocfs2_iocfs/ocf"L648"> 648
)
81href="+code=inod="+cod id="L652" class=");
<(0ffaolasuFsse" a a /a: ref">isvtm#37;d, 0" cla46svtm#37;d, aolasu"lin*" name="L655"> 655        i, 0" cla46,  classe");s="lin*" name="L655"> 655         579        8utex_8ocku32  655         655        
(inod7 581             8f="+c7"> 8     7 * We must double 8heck 8tate 75 = - 655         619}
 8     7 */
  619}
 *pin_l7ck" class="sref">s8in_lo85lass8"sref">ocfs2_iocf elsel= -1m="L581"> 581             8f got7=ca8ode=o7fs2_la_state_enabl8d" cl85a>(<68>;
 655        85=mai7_bm_inode" class="srefff=  619}
 73AL> =
inod7+e=s2/l1"L619"> 619}
st85mlog6errno( 662         655         581             8     7de=8pin_u7lock" class="sref"8spin_8nlock76" class="sref">osb-d="+cod id="L652" class=");
<(0ffaolasuFsse" ite   !\naolasu);ss="lin*" name="L655"> 655         8     7c#L664" id="L664" 8lass=8line"76rrno( 619}
alloc8/a> =8(stru76AL_ALLOC_SYSTEMf="+co"L662"> 662        of="+co"L662"> 662         637        l86us(&)) {
) !"sref"trace_loc_bi)) {
 =
 619}
 579         579         *inod7 73AL> =
 619}
main77AL_ALLOelse ame="L619"> 619}
st87t bi72 = - 619}
74ame="L664"> 664        87/a>)7 614        if (!8  got7=ca8alloc7calalloc.c#L576" i8="L5787ine"76sref">ocfs2_if="fs/ocfs2/lls="sr))resv.c#L640" id="L6))re)1ame="L579"> 579        )
81href="+code=inode" class="sref>;
osbhref=discar"v_f="+e=id1" class="sref">resmapb_lock);
&"a> =
 619}
8utex_87 568         = )) {
) !"sref"trace_loc_bi)) {
 629             8f="+c7de=8tatus7 class="sref">stat8s87cku32 ss="sref">alloc->id1.bitmap1.i_used) !=
 629             8a hre7"+c8de=st7tus" class="sref">8tatus88=ocf72_alloc_context"de=="a    7e> *inod7ffame="a> =
 619}
 665
7ut_mutex;
ocfs2/localallocinod7=s2/l1"L619"> 619}
 576
 576
hand8e8= osb findaloc_bi)="+coocfs2/alloc;
 617             8  8S_ERR8/a>(<78>;
 581             8  st88)"sref">alloc;
)="+c"lode;
 =
id1. 646             8ocfs27s+c8de=oc7=handle" class="sr8f">ha8dle = ocfs2_compls/oc="+c" class=inod7=s2/l1"L619"> 619}
mlog78name=L576"> 576
id1.bitmap1.i_used) !=
 650i5      unsign  got7s/o8fs2/l7calalloc.c#L592" i8="L5989 cla76ode=main_bm_inode" clasref">id1.bitmap1.i_used) !=
 650i5      unsign  got7 (&/="L665" class="llname=-> 650i5      unsign out"7=ca8fs2/l7/* we want the bit8ap ch8nge t793_mutexfor ce=id1" class="s/oc="+c" class=inod7ffamef="">ocfs2_compls/oc="+c" class=inod7f ame=de=_local_to_main="fs/e16sref">alloc->ae=id1" class="sref">/="L665" class="llname=->ocfs2_compls/oc="+c" class=inod7++ name="L617"> 617             8ocfs27ohand8e89/a>)81
/="L665" class="llname=->ocfs2_compls/oc="+c" class=inod7]ffame=0
 name="L652"> 650i5      unsign fs2/7sca8fs2/l7c#L596" id="L596" 8lass=8line"78rrno<"L576"> 576
stat8s89 hre80ame="L637"> 637         637        8tatus89="sr82ame=" 655        mlog78rrno="+co( 629             9     8oca9alloc8c#L601" id="L601" 9lass=90=ocf72_alloc_context" class="sref">ocf  ="+co(ac)
 629             9  href=s_wanted,
 629             9 2;
 581             9ref="8nlo9k" cl8ss="sref">out_unlo9k9
 =
,
 619}
hand9e9>ocfs80AL_ALLO>() !"mhref=--)l= -1m="L581"> 581             9ocfs28o5o9k" cl8s#L596" id="L596" 9lass=90lass8"sref">ocfs2_ioc,
ae=id1" class="ocalallocrsref">ac)
 =
) !"mhref= ne=++"a> =
 581             9o6fs28o5o9katus7 class="sref">stat9s90a>(<68>;
 =
) !pr2_lkref">aame="aolasu2_supeverify_a /a/ocfs:h0" cl vtm#37;u, /a>,
 vtmolasu"lin*" name="L655"> 655        aolasum#37;u\naolasu"lin*" svtmap"a> =
ac)
href=s_wanted,
 619}
9tatus9line"80unlock(&ocfs2/red=++"a> =
) !pr2_lkref">aame="aolasu2_supeverify_a /a/ocfs:hocftm#37;u " nset!aolasu"lin*" s=ame="L619"> 619}
((&ocfs2/red=++"a> =
ac)
 =
) !"mhref=ff=ame="L619"> 619}
ff=ame="L619"> 619}
iput( 576
(&8rrno<"L576"> 576
out:
 576
)8#endifrrno<"L576"> 576
83ame="L666"> 666#ifdef 9tatus9/a>)
8="srefd id="L652" class="line" name="L652"> 652 654sta91="sr82ame=" 652 652 654 655        
ine"icc">ocfs2_complete_losync loc_bito_maine="fs/b,
osb,
 629             9ocfs28olo9k" cl8 alloc. You lose t9em wh9n you82rrno(ac5" id="L565" class="line" name="L629"> 629             9ref="8"> 9
alloc;
 629             9cfs2/8"> 9 We w8ll add ourselves t9 the 92lass8"sref">ocfs2_ioc32 <<<<<<<<<<<<allocalloc 629             9c got8r6o9 our 8wn in order to shi9t win92a>(<68>;
) !=uffer_headfs/ocfs2/localalloc.cmain cla" class="sref">b_main cla"  629             9ommen8"> 9/
 581             9ommen8"f=9+code8ve_local_alloc_bit9" cla92le = ocfs2_complss="sro_main" class="sref">ocfs2_sme=0
 name="L652"> 650i5      unsig9ommen8   9     8      = ocfs2_compl id="Lss=_off" id="L630" class=_offame="a> =
 =
href=s_wanted,
 =
ac)
 650i5      unsig9f="+c8   9     8     struct ac 650i5      unsig9f acstatusblk"saline=0
 name="L652"> 650i5      unsig9f    8oca9alloc8tus" class="sref">9tatus9/a>;
83" classC_SYSTvoid"oc.c#L631" id="Lss=maped) !=
 650i5      unsig9fcfs28olo9+code8ocfs2_dinode" clas9="sre93()"sref">alloc;
)="+c"lode;
 =
id1. 646             9ommen8e> 9 576
 9 We w8+code=free_bits" c9ass="935cla76ode=main_bm_inode" cla"sref"trace_sync loc_bito_maine="fs/b,
 576
(<68>;
 =
ss="sref">alloc->id1.bitmap1.i_used) !=
 629         "fs/9fmmen8"> 9UG_ON8 class="sref">BUG_9N93=mai7_bm_inode" clame="a> =
ss="sref">alloc->id1.bitmap1.i_used) !=
 646             9f="+c8oca9alloc8c#L639" id="L639" 9lass=93s 579        bitmap1.i_used) !=
 581             9  661        }
 576
 613alloc->id1.bitmap1.i_used) !=
 613st94stru76AL_ALLOC_SY_if="fs/ocfs2/llfss="sref">alloc->id1.bitmap1.i_used) !=
 581             9 ="+c8 > 9href=7=mlog_errno" class9"sref94lass8"sref">ocfs2_iocf="+colocalalloc.c#L661" id="L661" class="line" name="L661"> 661        }
)
81href="+8rrno<"L576"> 576
 9UG_ON7calalloc.c#L648" i9="L6494 568         = osb_lock);
osb_lock 629             9     7de=9utex_7ock" class="sref">9utex_9ocku32 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<_if="fs/ocfs2/llfss="sref">alloc->/="L665" class="llname=-> 646             9  got7oca9alloc7c#L651" id="L651" 9lass=95=ocf830"+code=main_bm_bh" clocal_tss=maped) !=
 =
/="L665" class="llname=-> 646             9 ef="8 e=9ment"7/*
ac)
 =
,
 650i5      unsig9f="+c7"> 9     7 * We must double 9heck 95ine"79a>(&,
ss="sref">alloc->id1.bitmap1.i_used) !=
 650i5      unsig9fmmen8ef=9     7 * another process9may h95ef">74ame="L664"> 664         9     7 */
( 73AL> =
 =
 =
ac)
 629             9 ="+c8 > 9pin_l7ck" class="sref">s9in_lo95lass8"sref">ocfs2_ios="l=_l= -1m="L581"> 581             9f got7=ca9ode=o7fs2_la_state_enabl9d" cl95a>(<68>;
,
 73AL> =
ac)
 581             9fmmen8"> 9ode=b7ts_wanted" class="9ref">95=mai7_bm_inode" class="srefff=  619}
 73AL> =
ac)
 619}
st95mlog6errno( 619}
 576
href=s_wanted,
 581             9     7de=9pin_u7lock" class="sref"9spin_9nlock76" class="sref">osb-d->statusblk"salin"fame=="a> =
)
<_blkss=maped) !+cod>)
<_blkalin<+ -1m="L581"> 581             9 mmen8ef=9     7c#L664" id="L664" 9lass=9line"76rrno(osb_lock);
osb_lock 629             9     7d> 9     7class="sref">alloc9/a> =9(stru76AL_ALLOC_SYSTEMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMn_bm_inode" claocalallocrsref">ac)
href=s_wanted,
 619}
 9alloc7c#L666" id="L666" 9lass=96ef">83ame="L666"> 666#ifdef  =
alloc 576
l96=mai7_bm_inode" class="srefffffffftmap"a> =
href=s_wanted,
 =
ac)
href=s_wanted,
 629             9 ef="7dca9de=oc7s2_local_alloc_cou9t_bit96a> &79 =  =
)
<_blkss=maped) !+cod>)
<_blkalin name="L629"> 629             9     7de=9"+cod7=ocfs2_error" clas9="sre96cku32 <<<<<<<<<<<<<<>="+co( =
statusblk"salinff=ame="L619"> 619}
 619}
ocfs2_complss="sro_main" class="sref">ocfs2_sd->5" id="L565" class="line" name="L629"> 629             9     7de=9pin_u7=status" class="sr9f">st97t bi72 = -alloc 629             9=out"7=ca9alloc7=mlog_errno" class9"sref97 you82rrno(b_main cla"  =
statusblk"salin name="L629"> 629             9=    7d> 9href=7+code=out" class="9ref">97stru76AL_ALLOC_SYSTEMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM cl="a> =
href=s_wanted,
 619}
ocfs2_ioc32 ocfs2 ame==)_l= mm="L581"> 581             9c got7=ca9alloc7c#L577" id="L577" 9lass=97a>)
81href="+code=inoccccccccccccccccde=id1" class="mlog_err"sref">statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
9utex_97=mai7_bm_inode" class="sreffffffffffff="+colocalalloc.c#L661" id="L661" class="line" name="L661"> 661        }
 &79 =  576
stat9s97cku32 <8rrno<"L576"> 576
9tatus98=ocf72_alloc_context"f="+co{
,
 576
 619}
,
 619}
ac)
 =
 619}
 648
hand9e98ef">83ame="L666"> 666#ifdef 9S_ERR9/a>(<7olocalalloc.c#L661" id="L661" class="line" name="L614"> 614        if (!9  st98unlo80pu(ocfsfname="L614"> 614        if (!9  got7=+c9de=oc7=handle" class="sr9f">ha98ine"80unlock(&statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
u;
ocfs2/localallocss="sro_main" class="sref">ocfsf=ame="L619"> 619}
 648
 665
 581             9 out"7=ca9fs2/l7/* we want the bit9ap ch9nge t793_mutexa href="+code=a classlA_EVENT_SLIDE1href=s_wanted< classlA_EVENT_SLIDE(&ame=" 655        hand9e99/a>)81
 655         655        stat9s99a>)
8="srefd id="L652" clas2/localasssssssssssssssssssssssssssssssss* fre=, but a rtltiguous"lin*" name="L655"> 655         655        9tatus99="sr82ame=" 655        (&am;ame=" 655        10  ne"7.c#L62ame="L655"> 655        10 lloc89ion passed in, but may/localasssssssssssssssssssssssssssssssss* ouru 655        10 ine"7}f=ame="L619"> 619}
 614        if (!10 4   8oca10 ref=7 class="sref">hand10 re>10 /a> 83alalloc.c#L655" id="Ls="line" name="L652"> 65210 ine"7.c#L62 654stat10 at>10 a>)
8="srefd id="L652" clas2="line" name="L652"> 652 65210 e=>10 ="sr82ame=" 65210 lass8"sref" 65410al>)
8="srefd id="L652" clas2="line" name="L652"> 652iput10alloc89ion passed in, but may* R/a>;
 nlacisrefeO>(, re. Te" nvalue spn"line" name="L652"> 65210a2loc89ion passed in, but may* be igno 654out:
10a>ocf83ged them while holdings="lin*" name="L655"> 655        10a/a> 89pan>
ine"icc">ocfs2_complete_lorespac la_e{
osb,
 629             10a5   8oca10"+cod8=ocfs2_init_steal_10"+c>10alass8"sref">ocfs2_ioc32 <<<<<<<<<< 614        if (!1016   8oca10k" cl8tus" class="sref">10k" >10aa>(<78>;
 581             10a7   8oca10"+cod8=mlog_errno" class10"+c>10aunlo80pu(="+co( 619}
ocfs2_complss="="sref">alloc 619}
10amlog78name=L576"> 576
10aline81="+code=main_bm_bh" clspin lockss=maped) !spin lock="+coame="de=id1" class="ass="s>osb_lock);
 619}
10amain77AL_ALLOosb_lock);
alloc)_ss="=s=_o2_/a> 73AL> =
 581             10a2   8oca10alloc8sure we've got10all>10at bi72 = -osb_lock);
alloc)_ss="=s=_o2_/a> 73AL> =
 619}
10afs2/81rrno( 619}
10alloc82 href="fs/ocf"L648"> 648
83ame="L666"> 666#ifdef 10aa>)
81href="+3alalloc.c#L655" id="Ls="line" name="L652"> 65210aallo8.c#L62 654 655         655        10  s2/81rrno( 73AL> =
 581             1031   8oca10cfs2_8.c#L632" id="L632"10cfs>10 main77AL_ALLOC_SYSTEM3alalloc.c#L655" id="Ls="line" name="L652"> 65210all>10 2loc89ion passed in, but mayyyyyyyyyyyyyyyyy* We srn >ut of rtltiguous ionef in laciprimary"lin*" name="L655"> 655        10 >ocf83ged them while holdingyyyyyyyyyyyyyyyy* =
 655         65410 ine"7.c#L62 655        10 a>)
81href="+code=inode" class="srefocfsv_f="+code=ocfsocfsref"2_sd->osb_lock);
)_ocfss=_o2 ef= ef=ae=s2/l1"L619"> 619}
BUG_10UG_>10 =mai7_bm_inode" classf="+co{
osb_lock);
osb_lock 581             10 8   8oca10alloc8c#L639" id="L639" 10all>10 a> &79 =  65210 lass8"sref" 65210"+ass8"sref" 652( 655        10"2loc89ion passed in, but mayyyyyyyyyyyyyyyyyssssssss* re=s"coto ahrume laci=
 655        10">ocf83ged them while holdingyyyyyyyyyyyyyyyyssssssss* have changedld"way" name="L654"> 65410"/a> 83alalloc.c#L655" id="Lgyyyyyyyyyyyyyyyyssssssss*="lin*" name="L655"> 655        10"lass8"sref">ocfs2_ioc32 osb_lock);
alloc)_ss="=s=_o2_a> 73AL> =
 619}
10"a>(<68>;
 =
)_ocfsv_f="+code=ocfsloc_bi)_ocfss=_o2fame=="a> =
 619}
10"=mai7_bm_inode" class}Oelsel= -1m="L581"> 581             1048   8oca10alloc7c#L649" id="L649" 10all>10"a> &79 = osb_lock);
alloc)_ss="=s=_o2_a> 73AL> =
 619}
10ute>10"cku32 <8rrno<"L576"> 576
10al>)
81href="+code=inode" class="srefqueue_delayed_workss=maped) !queue_delayed_work="+code=id1" class="a_supewqv_f="+code=ocfs2_supewqine"  ame="de=id1" class="ass="s>osb_lock);
 629             1051   8oca10ment"7/*
10amain77AL_ALLOC_SYSTEM_INODE" class="sre =main_bm_bh" cl classlA_ENABLE_INTERVAL642" cid="L543" classlA_ENABLE_INTERVALine8ff=ame="L619"> 619}
 619}
 576
 576
s10pin>10a5cla76ode=mainalalloc.c#L655" id="Ls="line" name="L652"> 652 652 65210a="sr82ame=" 65210alass8"sref" 65410hr"sr82ame=" 655        10hmain77AL_ALLOosb_lock);
alloc)_ss="=s=_o2!_a> 73AL> =
 614        if (!1062   8oca10pin_u7lock" class="sref"10pin>10ht bi72 = -)_ocfsv_f="+code=ocfsloc_bi)_ocfss=_o2fame=="a> =
)_default_ocfsv_f="+code=ocfsloc_bi)_default_ocfsref"f=ame="L619"> 619}
10hef">74ame="L664"> 664        alloc10   >10h/a> 83localalloc.c#Lout_unlockss=maped) !>ut_unlockref" name="L614"> 614        if (!10h5   8oca10alloc7c#L666" id="L666" 10all>10h5cla76ode=main_bm_inode" class="="sref">alloc =
)_ss="="sref">alloc)_ss="=s=_of=ame="L619"> 619}
10h6cla76ode=main_bm_inode" claspin unlockss=maped) !spin unlock="+coame="de=id1" class="ass="s>osb_lock);
 619}
 568        10ha> &79 = ;
ocfs2/localallocss="="sref">alloc 619}
10hlass88rrno<"L576"> 576
 568        10 1a> 89pan>
ine"icc">ocfs2_complete_loloc_bi)_reserve_for_e{
)_reserve_for_e{
osb,
 629             1072   8oca10pin_u7=status" class="sr10pin>10 t bi72 = -)_rtltex61href=s_wanted)_rtltex6cfs2/llocalalloc.c#L62a">id1. 629             10 3   8oca10alloc7=mlog_errno" class10all>10  you82rrno(allocalloc 629             10 4   8oca10href=7+code=out" class="10hre>10 stru76AL_ALLOC_SYSTEMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMffffffb_=
 614        if (!1075   8oca10alloc7calalloc.c#L576" i10all>10 5>(<78>;
 581             1076   8oca10alloc7c#L577" id="L577" 10all>10 6cla76ode=maihref="">ocfs2_complss="sro_main" class="sref">ocfsf=ame="L619"> 619}
10de=>10  568        10 a> &79 = id1. =
id1.)_rtltex61href=s_wanted)_rtltex6cfs2) ne=++"a> =
 619}
stat10tat>10 mlog6errnoid1. 581             108    8oca10de=st7tus" class="sref">10de=>10de bi72 = -ocfs2_s-ode=EINVAL" claENOMEMo_main" class="ENOMEMocfsf=ame="L619"> 619}
10dmain77AL_ALLOC_SYSTEM3de=EINVAL" clamlog_err"sref">statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
10dt bi72 = - 661        }
10dfs2/81rrno 576
10dine"78AL_ALL576"> 576
hand10all>10d5a> 83localalloc.c#Lid1. 614        if (!1086   8oca10alloc7ERR" class="sref">10all>10d6cla76ode=mai(localalloc.c#L62a">id1. =
)_default_ocfsv_f="+code=ocfsloc_bi)_default_ocfsref"f=ame="L619"> 619}
10d=mai7_bm_inodode=EINVAL" class="sro_main" class="sref">ocfs2_sa href="+code=alloc" reserve_cluster_=
osb_lock);
id1. 619}
ocfs2__s-ode=EINVAL" claENOSPL642" cid="L543"ENOSPL 581             1089   8oca10"+cod7=mlog_errno" class10"+c>10dcku32 <osb_lock);
 61310hrtru76AL_ALLOC_SYSTEMMMMM> 73AL> =
 614        if (!1091   8oca10fs2/l7calalloc.c#L592" i10fs2>10hmain77AL_ALLOC_SYSTEM_INODE" f="+colocalalloc.c#L661" id="L661" class="line" name="L661"> 661        }
10hus 613allocid1. 619}
hand10hre>10hstru76AL_ALLOC_SYSTEM3de=EINVAL" clamemse61href=s_wantedid1.)_rtltex61href=s_wanted)_rtltex6cfs2)ff=ame="L619"> 619}
10hlass8"sref">ocfs2_iocf="+colocalalloc.c#Lid1. 619}
stat10tat>10ha>)
81href="+8rrno<"L576"> 576
ocfs2 ame==)_l= mm="L581"> 581             10h8   8oca10de=oc7tus" class="sref">10de=>10hine"80unlock(&statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
10hcku32  661        }
1100>)
81href="+8rrno<"L576"> 576
110line83AL_ALL665"> 665
110t bi72 = -allocid1.alloc 661        }
110ge t793_mutexa href="+code=aigras="s>osb_lockalloc 619}
hand11 re>1104 bi72 = -b_=
id1.b_a)_" ine" name="L661"> 661        }
1105cla76ode=main_bm_inode" claget_" class="sref">b_get_" ="+colocalalloc.c#L62=
b_=
 661        }
stat11 at>1106cla76ode=main_bm_inode" class="sro_main" class="sref">ocfs2_sme=0
 name="L652"> 650i5      unsig1107   8oca11     7            11 allo8.localalloc.c#L661" id="L661" class="line" name="L614"> 614        if (!11 8   8oca11 e=oc7tus" class="sref">11 e=>1108log6errnoocfs2 ame==)_ame="ame=""localalloc.c#L62a">id1. 581             11 9   8oca11 +cod7=mlog_errno" class11 +c>110cku32 )_rtltex61href=s_wanted)_rtltex6="+colocalalloc.c#L62a">id1. 619}
111rtru76AL_ALLOC_SYSTEMlocalalloc.c#L62a">id1. =
 661        }
iput111lloc82rrno 576
111us 613out:
111ine"76rrnoocfsfname="L614"> 614        if (!1114   8oca11k" cl8atus" class="sref"11k" >111stru76AL_ALLOC_SYSTEM3de=EINVAL" clamlog_err"sref">statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
11alass8"sref">o;
ocfs2/localallocss="sro_main" class="sref">ocfsf=ame="L619"> 619}
11k" >11aa>(<78rrno<"L576"> 576
111 568         652111lass8"sref" 654112l>)
8="srefd id="L652" clas2=="lin*" name="L655"> 655        
ocfs2_complete_loloc_bi)_new_e{
)_new_e{
osb,
 629             11a2   8oca11alloc8sure we've got11all>11at bi72 = -5" id="L565" class="line" name="L629"> 629             11a3   8oca11k" cl8 alloc. You lose t11k" >11afs2/81rrno()_rtltex61href=s_wanted)_rtltex6cfs2/localalloc.c#L62a">id1. 629             11a4   8oca11
 581             11a5   8oca11 We w8ll add ourselves t11 We>112lass8"sref">ohref="">ocfs2_complss="sro_main" class="sref">ocfs2_sme=0
 name="L652"> 650i5      unsig11a6   8oca11 our 8wn in order to shi11 ou>1126cla76ode=main_bm_inode" claualloc8tus" lass="u 2loc8code=EINVAL" cla.luster_"Lss=_off" id="L63.luster_"Ls
 619}
112unlo80pu(ocfs2/allocid1. =
 661        }
1128nlo80pu(ocfs2/)v_f="+code=ocfs2_supeloc_bi)cfs2/localalloc.c#L62sref">/="L665" class="l name="L661"> 661        }
 576
id1.alloc)_o class="sref">b_loc_bi)_o 
/="L665" clb_datrs="l name="L661"> 661        }
113 cla76ode=main_bm_inode" clasref">/="L665" class="l2_a> 73AL> =
 619}
11all>113us 613113ge t793_mutexa href="+code=a"sref"trace_loc_bi)_new_e{
)_new_e{
 613ss="sref">alloc->id1.bitmap1.i_used) !=
 629             1135   8oca11 We w8+code=free_bits" c11 We>113lass8"sref">ocfs2_iocode=EINVAL" cla2ss="s>osb_lock);
)_ocfss=_off=ame="L619"> 619}
11 a>)
8=ame="L619"> 619}
BUG_11UG_>11 =mai7_bm_inod;ame=" 655        113="sr82ame=" 655        11 lass8"sref" 655        114line81="+code=main_bm_bh" cla">id1.b_a)_1 73AL> =
) !la_1 661        }
114line83AL_ALL665"> 665
1142mai7_bm_inod;ame=" 655        11">ocf83ged them while holdingyyyyyyyy*2everyte"ng up nicely, says_erfhoulds no re=s"cowhy we canhouldt las="in*" name="L655"> 655        11"/a> 83alalloc.c#L655" id="Lgyyyyyyyy* 655        1145cla76ode=main_bm_inode" class="sro_main" class="sref">ocfs2_sa href="+code=alloc" oc.imhclustersv_f="+code=ocfs2_supeoc.imhclusters="+code=id1" class="sref">5" id="L565" class="line" e=main_bm_bh" cla">id1.)_ocfsv_f="+code=ocfsloc_bi)_ocfss=_o name="L629"> 629             1146   8oca11alloc7+code=bail" class=11all>11"a>(<68>;
 619}
114unlo80pu(ocfs2__s-ode=EINVAL" claENOSPL642" cid="L543"ENOSPL 581             1148   8oca11alloc7c#L649" id="L649" 11all>11"a> &7olocalalloc.c#Lid1. 614        if (!1149   8oca11utex_7ock" class="sref">11ute>11"cku32 <2ame=" 652115+ass8"sref" 652
115lloc89ion passed in, but may/localasssssssss*     w use of any fre= ocfs >( 652 652 655        
115stru76AL_ALLOC_SYSTEMosb_lock);
 613s11pin>115lass8"sref">ocfs2_ioca> <2main_bm_bh" cl classlA_DISABLED1href=s_wanted< classlA_DISABLED 614        if (!1156   8oca11ode=o7fs2_la_state_enabl11ode>115a>(<68>;
 661        }
 568        115ine"80unlock(&id1. =
)_default_ocfsv_f="+code=ocfsloc_bi)_default_ocfsref"f=ame="L619"> 619}
115cku32 ocfs2_sa href="+code=alloc" oc.imhclustersv_f="+code=ocfs2_supeoc.imhclusters="+code=id1" class="sref">5" id="L565" class="line" e=main_bm_bh" cla">id1. 619}
116rtru76AL_ALLOC_SYSTEMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM=main_bm_bh" cl2ss="s>osb_lock);
)_ocfss=_o name="L629"> 629             1161   8oca11fs2/l7calalloc.c#L662" i11fs2>116main77AL_ALLOC_SYSTEM_INODE" class="sre            ame="de=id1" class=".luster_"Lss=_off" id="L63.luster_"Ls
 629             1162   8oca11pin_u7lock" class="sref"11pin>11ht bi72 = - 619}
116fs2/81rrno(ocfs2__s-ode=EINVAL" claENOSPL642" cid="L543"ENOSPL 619}
alloc11   >116stru76AL_ALLOC_SYSTEMMMMMMMMMf="+colocalalloc.c#Lid1. 619}
116lass8"sref">ocfs2_iocoame=" 652116a>)
8="srefd id="L652" clas2/localasssssssss* We onlyur"line" name="L652"> 652 652 654116lass8"sref" 655        117rtru76AL_ALLOC_SYSTEMocfs2__s=)_l= mm="L581"> 581             1171   8oca11ode=m7in_bm_inode" class11ode>117main77AL_ALLOC_SYSTEM_INODE" de=id1" class="spin lockss=maped) !spin lock="+coame="de=id1" class="ass="s>osb_lock);
 619}
)_ocfsv_f="+code=ocfsloc_bi)_ocfss=_o2_sa href="+code=a.luster_.c#L61href=s_wanted 619}
11  you82rrno(osb_lock);
 619}
 576
117lass8"sref">o8rrno<"L576"> 576
11 6cla76ode=maiha hde=id1" class="ss="sro_main" class="sref">ocfs2 ame==)_l= mm="L581"> 581             1177   8oca11de=le7ock" class="sref">11de=>117=mai7_bm_inode" classf="+co{
ocfs2!_s-ode=EINVAL" claENOSPL642" cid="L543"ENOSPL 619}
117a> &79 = statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
stat11tat>117cku32  661        }
11de=>1180>)
81href="+8rrno<"L576"> 576
118line83AL_ALL665"> 665
11dt bi72 = - 73AL> =
) !la_1id1.b_a)_1 661        }
118ef">74ame="L664"> 664        1184 bi72 = - 73AL> =
/="L665" class="lhref="fs/ocfs2/localla_bm_"Lss=_off" id="L63la_bm_"Lss=_o2_sa href="+code=a.pu 619}
hand11all>1185cla76ode=main_bm_inode" clasref">id1.bitmap1.i_used) !=
 619}
11all>118a>)
81href="+3alalloc.c#L655" id="Ls= just in case... In lacifutureO>(en we find ionef >urselves,"lin*" name="L655"> 655        118allo8.c#L62 655         655        118lass8"sref" 655        119line81="+code=main_bm_bh" cla   <>id1.bitmap1.i_used) !=
 650i5      unsig1191   8oca11fs2/l7calalloc.c#L592" i11fs2>119 cla76ode=main_bm_inode" clamemse61href=s_wanted 629             1192   8oca11alloc7c#L593" id="L593" 11all>119t bi72 = -ss="sref">alloc-&g16a>ss="s="+code=id1" class="sref">/="L665" class="lhref="fs/ocfs2/localla_oL64s=_off" id="L63la_oL64="+cfff=ame="L619"> 619}
74ame="L664"> 664        hand11hre>1194 bi72 = - 73AL> =
osb_lock);
 629             1195   8oca11fs2/l7c#L596" id="L596" 11fs2>11hlass8"sref">ocfs2_ioc= - 619}
stat11tat>119a>)
8=ame="L619"> 619}
)_new_e{
)_new_e{
 619}
11de=>11hine"80unlock(& 629             1199   8oca11"+cod7=mlog_errno" class11"+c>11hcku32 <"fs/ocfs2/localless="sref">alloc->id1.bitmap1.i_used) !=
 619}
120 a h83ame="L568"> 568        120line8olocalalloc.c#L661" id="L661" class="line" name="L614"> 614        if (!1202   8oca12 lloc7c#L593" id="L593" 12 ll>120t bi72 = -ocfsfname="L614"> 614        if (!12 3   8oca12 s2/l7/* we want the bit12 s2>120 you82rrno( 73AL> =
statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
hand12 re>1204 bi72 = -;
ocfs2/localallocss="sro_main" class="sref">ocfsf=ame="L619"> 619}
1205cla78rrno<"L576"> 576
stat12 at>120a>)
8=ame="L619"> 619}
 655        12 e=>120="sr82ame=" 655        120ck
ine"icc">ocfs2_complete_loloc_bi)_slide_e{
)_slide_e{
osb,
 629             121    8oca12alloc8c#L611" id="L611" 12all>121rtru76AL_ALLOC_SYSTEMMMMMMMMMMMMMMMMMMMMMMMMMMMffffffalloc)_lass="sref">alloc)_lass=ocfsfname="L614"> 614        if (!1211   8oca12cfs2_8lass="sref">iput121lloc8l= mm="L581"> 581             12l2   8oca12alloc8c#L613" id="L613" 12all>121t bi72 = -ocfs2_complss="sro_main" class="sref">ocfs2_sme=0
 name="L652"> 650i5      unsig1213   8oca12k" cl8f">out:
121ine"76rrnob_main_bm_o 6tot2_sa href="+code=aNULL642" cid="L543"NULLine" name="L661"> 661        }
121stru76AL_ALLOffffffallocalloc 661        }
1215cla76ode=main_bm_inode" claass="l_61href=s_wanted5" id="L565" class="line"2_sa href="+code=aNULL642" cid="L543"NULLine" name="L661"> 661        }
12k" >1216tru76AL_ALLOffffffallocid1. 661        }
121unlo80pu(ocfs2/allocid1. 661        }
)_rtltex6cfs2/localalloc.c#L62a">id1. 661        }
121mlog78name=L576"> 576
122line81="+code=main_bm_bh" clote_lorespac la_e{
osb_lock);
 619}
122line83AL_ALL665"> 665
 655        12afs2/81rrnoocfs2_complss="sro_main" class="sref">ocfs2_scc">ocfs2_complete_loloc_bi)_reserve_for_e{
)_reserve_for_e{
 629             12a4   8oca12
id1. 619}
ocfs2_ioc= -alloc 619}
b_main_bm_o 6totff=ame="L619"> 619}
122unlo80pu(ocfs2 ame==)_l= mm="L581"> 581             1228   8oca12+code8ve_local_alloc_bit12+co>122ine"80unlock(&f="+co{
ocfs2!_s-ode=EINVAL" claENOSPL642" cid="L543"ENOSPL 619}
122cku32 <<<<<<<<<> 73AL> =
statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
 661        }
123lloc82rrno 576
12all>123us 613123ge t793_mutexa href="+code=asref">5" id="L565" class="line"2_sa href="+code=a href="tar6_"srnsef">osb,
osb_lock);
 619}
5" id="L565" class="line")fl= -1m="L581"> 581             1235   8oca12 We w8+code=free_bits" c12 We>123lass8"sref">ocfs2_iocode=EINVAL" class="sro_main" class="sref">ocfs2_scc">ocfs2_complPTR_ERR1href=s_wanted5" id="L565" class="line")f=ame="L619"> 619}
123a>(<68>;
5" id="L565" class="line"2_sa href="+code=aNULL642" cid="L543"NULLine" name="L661"> 661        }
BUG_12UG_>123=mai7_bm_inode" class> 73AL> =
statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
123ine"80unlock(&f="+colocalalloc.c#L661" id="L661" class="line" name="L661"> 661        }
1239loc82rrno 576
124 a h83ame="L568"> 568        124 cla76ode=main_bm_inode" claa   <>id1.alloc)_o class="sref">b_loc_bi)_o 
/="L665" clb_datrs="l name="L661"> 661        124us 613124ge t793_mutexaame=" 655        12"/a> 83alalloc.c#L655" id="Lgyyyyyyyy* 655        1245cla7"sref" 655        124a>)
8="srefd id="L652" clas2/localas* ocfs.sMake a copy says_e 655        124allo8.c#L62 655        1248cla76ode=main_bm_inode" claa   <_copy>id1.osb_lock);
b_loc_bi)_o 
 =
 619}
12ute>124mlog6errnoid1. 581             125    8oca12alloc7c#L651" id="L651" 12all>125e bi72 = -ocfs2_s-ode=EINVAL" claENOMEMo_main" class="ENOMEMocfsf=ame="L619"> 619}

125main77AL_ALLOC_SYSTEM3de=EINVAL" clamlog_err"sref">statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
 661        }
125fs2/81rrno 576
id1.)_o class="sref">b_loc_bi)_o 
 619}
s12pin>125lass8=ame="L619"> 619}
ocfs2_sa href="+code=alloc" journal_access dl"sref">alloc5" id="L565" class="line" =ame="L619"> 619}
alloc)_lass=ocfsf =ame="L619"> 619}
125ine"80unlock(&sssssssssssssssssssssssssco{
osb_lock);
b_loc_bi)_o 
 619}
125cku32  619}
126rtru76AL_ALLOocfs2 ame==)_l= mm="L581"> 581             1261   8oca12fs2/l7calalloc.c#L662" i12fs2>126main77AL_ALLOC_SYSTEM3de=EINVAL" clamlog_err"sref">statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
12ht bi72 = - 661        }
126fs2/81rrno 576
alloc12   >126stru7rrno<"L576"> 576
126lass8"sref">oa href="+code=alloc" oceareloc_bi)"sref">alloc)="+code=id1" class="a   <>id1. 619}
1266cla76ode=main_bm_inode" clalloc" journal_dirty>id1.5" id="L565" class="line" sco{
osb_lock);
b_loc_bi)_o 
 619}
 568        1268cla76ode=main_bm_inode" class="sro_main" class="sref">ocfs2_sa href="+code=alloc" synceloc_bito_mainef">osb,
osb_lock);
5" id="L565" class="line" e=main_bm_bh" cla   <_copy>id1. 568        126cku32 allocb_main_bm_o 6totff=ame="L619"> 619}
ocfs2 ame==)_l= mm="L581"> 581             1271   8oca12ode=m7in_bm_inode" class12ode>127main77AL_ALLOC_SYSTEM3de=EINVAL" clamlog_err"sref">statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
 661        }
127fs2/81rrno 576
 576
127lass8"sref">oa href="+code=ass="sro_main" class="sref">ocfs2_scc">ocfs2_complete_loloc_bi)_new_e{
)_new_e{
osb_lock);
5" id="L565" class="line" e=main_bm_bh" cla">id1. 619}
12 6cla76ode=maiha hde=id1" class="ss="sro_main" class="sref">ocfs2 ame==)_l= mm="L581"> 581             1277   8oca12de=le7ock" class="sref">12de=>127=mai7_bm_inode" classf="+co{
ocfs2!_s-ode=EINVAL" claENOSPL642" cid="L543"ENOSPL 619}
127a> &79 = statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
stat12tat>127cku32  661        }
12de=>1280>)
81href="+8rrno<"L576"> 576
128line83AL_ALL665"> 665
12dt bi72 = - 73AL> =
id1.osb_lock);
 619}
128ef">74ame="L664"> 664        1284 bi7olocalalloc.c#L661" id="L661" class="line" name="L614"> 614        if (!1285   8oca12alloc7 class="sref">hand12all>1285cla76ode=maif="+co{
5" id="L565" class="line")name="L614"> 614        if (!1286   8oca12alloc7ERR" class="sref">12all>128a>(<68>;
osb,
osb_lock);
5" id="L565" class="line"ff=ame="L619"> 619}
128 568        b_main_bm_o 6totff=ame="L619"> 619}
128mlog78name=L576"> 576
129rtru76AL_ALLOalloc 614        if (!1291   8oca12fs2/l7calalloc.c#L592" i12fs2>129main77AL_ALLOC_SYSTEM3de=EINVAL" claipu61href=s_wantedalloc 619}
129us 613 613hand12hre>129stru76AL_ALLOC_SYSTEMa href="+code=akfre=>id1. 619}
129lass8=ame="L619"> 619}
stat12tat>1296cla76ode=maiha hde=id1" class="a">id1. 619}
 73AL> =
id1. 619}
12de=>12hine"8=ame="L619"> 619}
129mlog6errnoocfsf=ame="L619"> 619}
130e bi72 = -statusmlog_err"s="+code=id1" class="ss="sro_main" class="sref">ocfsff=ame="L619"> 619}
130main77AL_ALLO;
ocfs2/localallocss="sro_main" class="sref">ocfsf=ame="L619"> 619}
130t bi78rrno<"L576"> 576
74ame="L664"> 664        hand13 re>1304 bi7


The original LXR software byLXR oommunityine" ela" nexperis/ocal vers="c bylxr@s="ux."s lxr.s="ux."s kis="y hostss oyiame="L664http://www.redpill-s="pro."sr>Redpill L="pro ASine" eprovider of L="ux rtlsul6ing"andnoper s="cs services sla"e 1995.