1. 15 4月, 2015 4 次提交
  2. 11 2月, 2015 1 次提交
  3. 19 12月, 2014 1 次提交
    • J
      ocfs2: reflink: fix slow unlink for refcounted file · f62f12b3
      Junxiao Bi 提交于
      When running ocfs2 test suite multiple nodes reflink stress test, for a
      4 nodes cluster, every unlink() for refcounted file needs about 700s.
      
      The slow unlink is caused by the contention of refcount tree lock since
      all nodes are unlink files using the same refcount tree.  When the
      unlinking file have many extents(over 1600 in our test), most of the
      extents has refcounted flag set.  In ocfs2_commit_truncate(), it will
      execute the following call trace for every extents.  This means it needs
      get and released refcount tree lock about 1600 times.  And when several
      nodes are do this at the same time, the performance will be very low.
      
        ocfs2_remove_btree_range()
        --  ocfs2_lock_refcount_tree()
        ----  ocfs2_refcount_lock()
        ------  __ocfs2_cluster_lock()
      
      ocfs2_refcount_lock() is costly, move it to ocfs2_commit_truncate() to
      do lock/unlock once can improve a lot performance.
      Signed-off-by: NJunxiao Bi <junxiao.bi@oracle.com>
      Cc: Wengang <wen.gang.wang@oracle.com>
      Reviewed-by: NMark Fasheh <mfasheh@suse.de>
      Cc: Joel Becker <jlbec@evilplan.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f62f12b3
  4. 07 8月, 2014 1 次提交
  5. 05 6月, 2014 1 次提交
    • X
      ocfs2: fix umount hang while shutting down truncate log · a9e9acae
      Xue jiufei 提交于
      Revert commit 75f82eaa ("ocfs2: fix NULL pointer dereference when
      dismount and ocfs2rec simultaneously") because it may cause a umount
      hang while shutting down the truncate log.
      
      fix NULL pointer dereference when dismount and ocfs2rec simultaneously
      
      The situation is as followes:
      ocfs2_dismout_volume
      -> ocfs2_recovery_exit
        -> free osb->recovery_map
      -> ocfs2_truncate_shutdown
        -> lock global bitmap inode
          -> ocfs2_wait_for_recovery
      	  -> check whether osb->recovery_map->rm_used is zero
      
      Because osb->recovery_map is already freed, rm_used can be any other
      values, so it may yield umount hang.
      
      To prevent NULL pointer dereference while getting sys_root_inode, we use
      a osb_tl_disable flag to disable schedule osb_truncate_log_wq after
      truncate log shutdown.
      Signed-off-by: Njoyce.xue <xuejiufei@huawei.com>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9e9acae
  6. 04 4月, 2014 2 次提交
  7. 11 2月, 2014 1 次提交
  8. 07 2月, 2014 1 次提交
  9. 22 1月, 2014 1 次提交
  10. 13 11月, 2013 1 次提交
  11. 04 7月, 2013 1 次提交
  12. 22 2月, 2013 1 次提交
  13. 14 4月, 2012 1 次提交
  14. 17 11月, 2011 1 次提交
  15. 24 5月, 2011 2 次提交
  16. 31 3月, 2011 1 次提交
  17. 22 2月, 2011 2 次提交
    • T
      ocfs2: Remove DISK_ALLOC from masklog. · 81bad697
      Tao Ma 提交于
      Since all 4 files, localalloc.c, suballoc.c, alloc.c and
      resize.c, which use DISK_ALLOC are changed to trace events,
      Remove masklog DISK_ALLOC totally.
      Signed-off-by: NTao Ma <boyu.mt@taobao.com>
      81bad697
    • T
      ocfs2: Remove mlog(0) from fs/ocfs2/alloc.c · a09d09b8
      Tao Ma 提交于
      This is the first try of replacing debug mlog(0,...) to
      trace events. Wengang has did some work in his original
      patch
      http://oss.oracle.com/pipermail/ocfs2-devel/2009-November/005513.html
      But he didn't finished it.
      
      So this patch removes all mlog(0,...) from alloc.c and adds
      the corresponding trace events. Different mlogs have different
      solutions.
      1. Some are replaced with trace event directly.
      2. Some are replaced and some new parameters are added since
         I think we need to know the btree owner in that case.
      3. Some are combined into one trace events.
      4. Some redundant mlogs are removed.
      What's more, it defines some event classes so that we can use
      them later.
      
      Cc: Wengang Wang <wen.gang.wang@oracle.com>
      Signed-off-by: NTao Ma <boyu.mt@taobao.com>
      a09d09b8
  18. 07 3月, 2011 1 次提交
    • T
      ocfs2: Remove EXIT from masklog. · c1e8d35e
      Tao Ma 提交于
      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: NTao Ma <boyu.mt@taobao.com>
      c1e8d35e
  19. 21 2月, 2011 1 次提交
    • T
      ocfs2: Remove ENTRY from masklog. · ef6b689b
      Tao Ma 提交于
      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: NTao Ma <boyu.mt@taobao.com>
      ef6b689b
  20. 08 1月, 2011 1 次提交
  21. 16 12月, 2010 1 次提交
    • T
      ocfs2: Try to free truncate log when meeting ENOSPC in write. · 50308d81
      Tao Ma 提交于
      Recently, one of our colleagues meet with a problem that if we
      write/delete a 32mb files repeatly, we will get an ENOSPC in
      the end. And the corresponding bug is 1288.
      http://oss.oracle.com/bugzilla/show_bug.cgi?id=1288
      
      The real problem is that although we have freed the clusters,
      they are in truncate log and they will be summed up so that
      we can free them once in a whole.
      
      So this patch just try to resolve it. In case we see -ENOSPC
      in ocfs2_write_begin_no_lock, we will check whether the truncate
      log has enough clusters for our need, if yes, we will try to
      flush the truncate log at that point and try again. This method
      is inspired by Mark Fasheh <mfasheh@suse.com>. Thanks.
      
      Cc: Mark Fasheh <mfasheh@suse.com>
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      50308d81
  22. 08 9月, 2010 1 次提交
  23. 19 5月, 2010 2 次提交
    • T
      Ocfs2: Make ocfs2_find_cpos_for_left_leaf() public. · ee149a7c
      Tristan Ye 提交于
      The original idea to pull ocfs2_find_cpos_for_left_leaf() out of
      alloc.c is to benefit punching-holes optimization patch, it however,
      can also be referred by other funcs in the future who want to do the
      same job.
      Signed-off-by: NTristan Ye <tristan.ye@oracle.com>
      Acked-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      ee149a7c
    • T
      Ocfs2: Optimize ocfs2 truncate to use ocfs2_remove_btree_range() instead. · 78f94673
      Tristan Ye 提交于
      Truncate is just a special case of punching holes(from new i_size to
      end), we therefore could take advantage of the existing
      ocfs2_remove_btree_range() to reduce the comlexity and redundancy in
      alloc.c.  The goal here is to make truncate more generic and
      straightforward.
      
      Several functions only used by ocfs2_commit_truncate() will smiply be
      removed.
      
      ocfs2_remove_btree_range() was originally used by the hole punching
      code, which didn't take refcount trees into account (definitely a bug).
      We therefore need to change that func a bit to handle refcount trees.
      It must take the refcount lock, calculate and reserve blocks for
      refcount tree changes, and decrease refcounts at the end.  We replace 
      ocfs2_lock_allocators() here by adding a new func
      ocfs2_reserve_blocks_for_rec_trunc() which accepts some extra blocks to
      reserve.  This will not hurt any other code using
      ocfs2_remove_btree_range() (such as dir truncate and hole punching).
      
      I merged the following steps into one patch since they may be
      logically doing one thing, though I know it looks a little bit fat
      to review.
      
      1). Remove redundant code used by ocfs2_commit_truncate(), since we're
          moving to ocfs2_remove_btree_range anyway.
      
      2). Add a new func ocfs2_reserve_blocks_for_rec_trunc() for purpose of
          accepting some extra blocks to reserve.
      
      3). Change ocfs2_prepare_refcount_change_for_del() a bit to fit our
          needs.  It's safe to do this since it's only being called by
          truncate.
      
      4). Change ocfs2_remove_btree_range() a bit to take refcount case into
          account.
      
      5). Finally, we change ocfs2_commit_truncate() to call
          ocfs2_remove_btree_range() in a proper way.
      
      The patch has been tested normally for sanity check, stress tests
      with heavier workload will be expected.
      
      Based on this patch, fixing the punching holes bug will be fairly easy.
      Signed-off-by: NTristan Ye <tristan.ye@oracle.com>
      Acked-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      78f94673
  24. 06 5月, 2010 3 次提交
    • T
      ocfs2: Make ocfs2_extend_trans() really extend. · c901fb00
      Tao Ma 提交于
      In ocfs2, we use ocfs2_extend_trans() to extend a journal handle's
      blocks. But if jbd2_journal_extend() fails, it will only restart
      with the the new number of blocks.  This tends to be awkward since
      in most cases we want additional reserved blocks. It makes our code
      harder to mantain since the caller can't be sure all the original
      blocks will not be accessed and dirtied again.  There are 15 callers
      of ocfs2_extend_trans() in fs/ocfs2, and 12 of them have to add
      h_buffer_credits before they call ocfs2_extend_trans().  This makes
      ocfs2_extend_trans() really extend atop the original block count.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      c901fb00
    • M
      ocfs2: use allocation reservations during file write · 4fe370af
      Mark Fasheh 提交于
      Add a per-inode reservations structure and pass it through to the
      reservations code.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      4fe370af
    • 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
  25. 22 3月, 2010 1 次提交
  26. 26 3月, 2010 1 次提交
  27. 06 5月, 2010 1 次提交
  28. 05 3月, 2010 1 次提交
    • C
      dquot: cleanup space allocation / freeing routines · 5dd4056d
      Christoph Hellwig 提交于
      Get rid of the alloc_space, free_space, reserve_space, claim_space and
      release_rsv dquot operations - they are always called from the filesystem
      and if a filesystem really needs their own (which none currently does)
      it can just call into it's own routine directly.
      
      Move shared logic into the common __dquot_alloc_space,
      dquot_claim_space_nodirty and __dquot_free_space low-level methods,
      and rationalize the wrappers around it to move as much as possible
      code into the common block for CONFIG_QUOTA vs not.  Also rename
      all these helpers to be named dquot_* instead of vfs_dq_*.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      5dd4056d
  29. 27 2月, 2010 1 次提交
  30. 17 12月, 2009 1 次提交
  31. 04 12月, 2009 1 次提交