14 Apr, 2012

1 commit


31 Mar, 2011

1 commit


07 Mar, 2011

1 commit

  • mlog_exit is used to record the exit status of a function.
    But because it is added in so many functions, if we enable it,
    the system logs get filled up quickly and cause too much I/O.
    So actually no one can open it for a production system or even
    for a test.

    This patch just try to remove it or change it. So:
    1. if all the error paths already use mlog_errno, it is just removed.
    Otherwise, it will be replaced by mlog_errno.
    2. if it is used to print some return value, it is replaced with
    mlog(0,...).
    mlog_exit_ptr is changed to mlog(0.
    All those mlog(0,...) will be replaced with trace events later.

    Signed-off-by: Tao Ma

    Tao Ma
     

22 Feb, 2011

2 commits


21 Feb, 2011

1 commit

  • ENTRY is used to record the entry of a function.
    But because it is added in so many functions, if we enable it,
    the system logs get filled up quickly and cause too much I/O.
    So actually no one can open it for a production system or even
    for a test.

    So for mlog_entry_void, we just remove it.
    for mlog_entry(...), we replace it with mlog(0,...), and they
    will be replace by trace event later.

    Signed-off-by: Tao Ma

    Tao Ma
     

02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König
     

16 Oct, 2010

1 commit


12 Oct, 2010

1 commit

  • This patch adds a safe check to ensure bg_free_bits_count doesn't exceed
    bg_bits in a group descriptor. This is to avoid on disk corruption that was
    seen recently.

    debugfs: group
    Group Chain: 179 Parent Inode: 11 Generation: 2959379682
    CRC32: 00000000 ECC: 0000
    ## Block# Total Used Free Contig Size
    0 52803072 32256 4294965350 34202 18207 4032
    ......

    Signed-off-by: Srinivas Eeda
    Signed-off-by: Joel Becker

    Srinivas Eeda
     

24 Sep, 2010

1 commit


08 Sep, 2010

4 commits

  • This allows code which needs to know the eventual block number of an inode
    but can't allocate it yet due to transaction or lock ordering. For example,
    ocfs2_create_inode_in_orphan() currently gives a junk blkno for preparation
    of the orphan dir because it can't yet know where the actual inode is placed
    - that code is actually in ocfs2_mknod_locked. This is a problem when the
    orphan dirs are indexed as the junk inode number will create an index entry
    which goes unused (and fails the later removal from the orphan dir). Now
    with these interfaces, ocfs2_create_inode_in_orphan() can run the block
    group search (and get back the inode block number) *before* any actual
    allocation occurs.

    Signed-off-by: Mark Fasheh
    Signed-off-by: Tao Ma

    Mark Fasheh
     
  • ocfs2_search_chain() makes the same updates as
    ocfs2_alloc_dinode_update_counts to the alloc inode. Instead of open coding
    the bitmap update, use our helper function.

    Signed-off-by: Mark Fasheh
    Signed-off-by: Tao Ma

    Mark Fasheh
     
  • We were setting ac->ac_last_group in ocfs2_claim_suballoc_bits from
    res->sr_bg_blkno. Unfortunately, res->sr_bg_blkno is going to be zero under
    normal (non-fragmented) circumstances. The discontig block group patches
    effectively turned off that feature. Fix this by correctly calculating what
    the next group hint should be.

    Acked-by: Tao Ma
    Signed-off-by: Mark Fasheh
    Tested-by: Goldwyn Rodrigues
    Signed-off-by: Tao Ma

    Mark Fasheh
     
  • We have added discontig block group now, and now an inode
    can be allocated in an discontig block group. So get
    it in ocfs2_get_suballoc_slot_bit.

    The old ocfs2_test_suballoc_bit gets group block no
    from the allocation inode which is wrong. Fix it by
    passing the right group.

    Acked-by: Mark Fasheh
    Signed-off-by: Tao Ma

    Tao Ma
     

13 Jul, 2010

1 commit

  • In ocfs2_block_group_alloc, we set c_blkno by bg->bg_blkno.
    But actually bg->bg_blkno is already changed to little endian
    in ocfs2_block_group_fill. So remove the extra cpu_to_le64.

    Reported-by: Marcos Matsunaga
    Signed-off-by: Tao Ma
    Signed-off-by: Joel Becker

    Tao Ma
     

19 May, 2010

1 commit


06 May, 2010

5 commits

  • They all take an ocfs2_alloc_context, which has the allocation inode.

    Signed-off-by: Joel Becker
    Signed-off-by: Tao Ma

    Joel Becker
     
  • Inodes are always allocated from the global bitmap now so we don't need this
    any more. Also, the existing implementation bounces reservations around
    needlessly.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     
  • Otherwise, the need for a very large contiguous allocation tends to
    wreak havoc on many inode allocation reservations on the local alloc, thus
    ruining any chances for contiguousness.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     
  • Use the reservations system for unindexed dir tree allocations. We don't
    bother with the indexed tree as reads from it are mostly random anyway.
    Directory reservations are marked seperately, to allow the reservations code
    a chance to optimize their window sizes. This patch allocates only 8 bits
    for directory windows as they generally are not expected to grow as quickly
    as file data. Future improvements to dir window sizing can trivially be
    made.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     
  • jbd[2]_journal_dirty_metadata() only returns 0. It's been returning 0
    since before the kernel moved to git. There is no point in checking
    this error.

    ocfs2_journal_dirty() has been faithfully returning the status since the
    beginning. All over ocfs2, we have blocks of code checking this can't
    fail status. In the past few years, we've tried to avoid adding these
    checks, because they are pointless. But anyone who looks at our code
    assumes they are needed.

    Finally, ocfs2_journal_dirty() is made a void function. All error
    checking is removed from other files. We'll BUG_ON() the status of
    jbd2_journal_dirty_metadata() just in case they change it someday. They
    won't.

    Signed-off-by: Joel Becker

    Joel Becker
     

27 Apr, 2010

1 commit

  • ac_last_group is used to record the last block group we
    used during allocation. But the initialization process
    only calls ocfs2_which_suballoc_group and fails to
    use suballoc_loc properly. So let us do it.
    Another function ocfs2_test_suballoc_bit also needs fix.

    I have searched all the callers of ocfs2_which_suballoc_group,
    and all the callers notices suballoc_loc now.

    Signed-off-by: Tao Ma

    Tao Ma
     

22 Apr, 2010

1 commit


13 Apr, 2010

4 commits


26 Mar, 2010

6 commits


24 Mar, 2010

1 commit

  • When the local alloc file changes windows, unused bits are freed back to the
    global bitmap. By defnition, those bits can not be in use by any file. Also,
    the local alloc will never have been able to allocate those bits if they
    were part of a previous truncate. Therefore it makes sense that we should
    clear unused local alloc bits in the undo buffer so that they can be used
    immediatly.

    [ Modified to call it ocfs2_release_clusters() -- Joel ]

    Signed-off-by: Mark Fasheh
    Signed-off-by: Joel Becker

    Mark Fasheh
     

22 Mar, 2010

1 commit


18 Mar, 2010

1 commit

  • In ocfs2_validate_gd_parent, we check bg_chain against the
    cl_next_free_rec of the dinode. Actually in resize, we have
    the chance of bg_chain == cl_next_free_rec. So add some
    additional condition check for it.

    I also rename paramter "clean_error" to "resize", since the
    old one is not clearly enough to indicate that we should only
    meet with this case in resize.

    btw, the correpsonding bug is
    http://oss.oracle.com/bugzilla/show_bug.cgi?id=1230.

    Signed-off-by: Tao Ma
    Signed-off-by: Joel Becker

    Tao Ma
     

27 Feb, 2010

1 commit

  • This patch add extent block (metadata) stealing mechanism for
    extent allocation. This mechanism is same as the inode stealing.
    if no room in slot specific extent_alloc, we will try to
    allocate extent block from the next slot.

    Signed-off-by: Tiger Yang
    Acked-by: Tao Ma
    Signed-off-by: Joel Becker

    Tiger Yang
     

05 Sep, 2009

3 commits