1. 24 9月, 2010 1 次提交
  2. 08 9月, 2010 4 次提交
  3. 13 7月, 2010 1 次提交
  4. 19 5月, 2010 1 次提交
  5. 06 5月, 2010 4 次提交
    • M
      ocfs2: remove ocfs2_local_alloc_in_range() · a57c8fd2
      Mark Fasheh 提交于
      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: NMark Fasheh <mfasheh@suse.com>
      a57c8fd2
    • M
      ocfs2: allocate btree internal block groups from the global bitmap · 33d5d380
      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: NMark Fasheh <mfasheh@suse.com>
      33d5d380
    • M
      ocfs2: use allocation reservations for directory data · e3b4a97d
      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: NMark Fasheh <mfasheh@suse.com>
      e3b4a97d
    • J
      ocfs2: Make ocfs2_journal_dirty() void. · ec20cec7
      Joel Becker 提交于
      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: NJoel Becker <joel.becker@oracle.com>
      ec20cec7
  6. 24 3月, 2010 1 次提交
    • M
      ocfs2: Clear undo bits when local alloc is freed · b4414eea
      Mark Fasheh 提交于
      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: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      b4414eea
  7. 27 4月, 2010 1 次提交
    • T
      ocfs2: Set ac_last_group properly with discontig group. · abf1b3cb
      Tao Ma 提交于
      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: NTao Ma <tao.ma@oracle.com>
      abf1b3cb
  8. 22 3月, 2010 1 次提交
  9. 13 4月, 2010 1 次提交
  10. 22 4月, 2010 1 次提交
  11. 26 3月, 2010 4 次提交
  12. 06 5月, 2010 1 次提交
  13. 26 3月, 2010 2 次提交
  14. 13 4月, 2010 3 次提交
  15. 18 3月, 2010 1 次提交
  16. 27 2月, 2010 1 次提交
  17. 05 9月, 2009 3 次提交
  18. 23 6月, 2009 1 次提交
  19. 22 4月, 2009 2 次提交
  20. 04 4月, 2009 4 次提交
    • W
      ocfs2: fix rare stale inode errors when exporting via nfs · 6ca497a8
      wengang wang 提交于
      For nfs exporting, ocfs2_get_dentry() returns the dentry for fh.
      ocfs2_get_dentry() may read from disk when the inode is not in memory,
      without any cross cluster lock. this leads to the file system loading a
      stale inode.
      
      This patch fixes above problem.
      
      Solution is that in case of inode is not in memory, we get the cluster
      lock(PR) of alloc inode where the inode in question is allocated from (this
      causes node on which deletion is done sync the alloc inode) before reading
      out the inode itsself. then we check the bitmap in the group (the inode in
      question allcated from) to see if the bit is clear. if it's clear then it's
      stale. if the bit is set, we then check generation as the existing code
      does.
      
      We have to read out the inode in question from disk first to know its alloc
      slot and allot bit. And if its not stale we read it out using ocfs2_iget().
      The second read should then be from cache.
      
      And also we have to add a per superblock nfs_sync_lock to cover the lock for
      alloc inode and that for inode in question. this is because ocfs2_get_dentry()
      and ocfs2_delete_inode() lock on them in reverse order. nfs_sync_lock is locked
      in EX mode in ocfs2_get_dentry() and in PR mode in ocfs2_delete_inode(). so
      that mutliple ocfs2_delete_inode() can run concurrently in normal case.
      
      [mfasheh@suse.com: build warning fixes and comment cleanups]
      Signed-off-by: NWengang Wang <wen.gang.wang@oracle.com>
      Acked-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      6ca497a8
    • T
      ocfs2: Optimize inode group allocation by recording last used group. · feb473a6
      Tao Ma 提交于
      In ocfs2, the block group search looks for the "emptiest" group
      to allocate from. So if the allocator has many equally(or almost
      equally) empty groups, new block group will tend to get spread
      out amongst them.
      
      So we add osb_inode_alloc_group in ocfs2_super to record the last
      used inode allocation group.
      For more details, please see
      http://oss.oracle.com/osswiki/OCFS2/DesignDocs/InodeAllocationStrategy.
      
      I have done some basic test and the results are a ten times improvement on
      some cold-cache stat workloads.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      feb473a6
    • T
      ocfs2: Allocate inode groups from global_bitmap. · 60ca81e8
      Tao Ma 提交于
      Inode groups used to be allocated from local alloc file,
      but since we want all inodes to be contiguous enough, we
      will try to allocate them directly from global_bitmap.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      60ca81e8
    • T
      ocfs2: Optimize inode allocation by remembering last group · 13821151
      Tao Ma 提交于
      In ocfs2, the inode block search looks for the "emptiest" inode
      group to allocate from. So if an inode alloc file has many equally
      (or almost equally) empty groups, new inodes will tend to get
      spread out amongst them, which in turn can put them all over the
      disk. This is undesirable because directory operations on conceptually
      "nearby" inodes force a large number of seeks.
      
      So we add ip_last_used_group in core directory inodes which records
      the last used allocation group. Another field named ip_last_used_slot
      is also added in case inode stealing happens. When claiming new inode,
      we passed in directory's inode so that the allocation can use this
      information.
      For more details, please see
      http://oss.oracle.com/osswiki/OCFS2/DesignDocs/InodeAllocationStrategy.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      13821151
  21. 06 1月, 2009 2 次提交
    • J
      ocfs2: Use metadata-specific ocfs2_journal_access_*() functions. · 13723d00
      Joel Becker 提交于
      The per-metadata-type ocfs2_journal_access_*() functions hook up jbd2
      commit triggers and allow us to compute metadata ecc right before the
      buffers are written out.  This commit provides ecc for inodes, extent
      blocks, group descriptors, and quota blocks.  It is not safe to use
      extened attributes and metaecc at the same time yet.
      
      The ocfs2_extent_tree and ocfs2_path abstractions in alloc.c both hide
      the type of block at their root.  Before, it didn't matter, but now the
      root block must use the appropriate ocfs2_journal_access_*() function.
      To keep this abstract, the structures now have a pointer to the matching
      journal_access function and a wrapper call to call it.
      
      A few places use naked ocfs2_write_block() calls instead of adding the
      blocks to the journal.  We make sure to calculate their checksum and ecc
      before the write.
      
      Since we pass around the journal_access functions.  Let's typedef them
      in ocfs2.h.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      13723d00
    • J
      ocfs2: block read meta ecc. · d6b32bbb
      Joel Becker 提交于
      Add block check calls to the read_block validate functions.  This is the
      almost all of the read-side checking of metaecc.  xattr buckets are not checked
      yet.   Writes are also unchecked, and so a read-write mount will quickly fail.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      d6b32bbb