1. 15 1月, 2016 1 次提交
  2. 06 11月, 2015 3 次提交
  3. 05 9月, 2015 4 次提交
  4. 25 6月, 2015 4 次提交
  5. 17 2月, 2015 2 次提交
  6. 11 2月, 2015 1 次提交
  7. 01 11月, 2014 1 次提交
  8. 05 6月, 2014 1 次提交
  9. 04 4月, 2014 1 次提交
  10. 12 9月, 2013 2 次提交
    • J
      ocfs2: use i_size_read() to access i_size · f17c20dd
      Junxiao Bi 提交于
      Though ocfs2 uses inode->i_mutex to protect i_size, there are both
      i_size_read/write() and direct accesses.  Clean up all direct access to
      eliminate confusion.
      Signed-off-by: NJunxiao Bi <junxiao.bi@oracle.com>
      Cc: Jie Liu <jeff.liu@oracle.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>
      f17c20dd
    • Y
      ocfs2: lighten up allocate transaction · 2b1e55c3
      Younger Liu 提交于
      The issue scenario is as following:
      
      When fallocating a very large disk space for a small file,
      __ocfs2_extend_allocation attempts to get a very large transaction.  For
      some journal sizes, there may be not enough room for this transaction,
      and the fallocate will fail.
      
      The patch below extends & restarts the transaction as necessary while
      allocating space, and should work with even the smallest journal.  This
      patch refers ext4 resize.
      
      Test:
      # mkfs.ocfs2 -b 4K -C 32K -T datafiles /dev/sdc
      ...(jounral size is 32M)
      # mount.ocfs2 /dev/sdc /mnt/ocfs2/
      # touch /mnt/ocfs2/1.log
      # fallocate -o 0 -l 400G /mnt/ocfs2/1.log
      fallocate: /mnt/ocfs2/1.log: fallocate failed: Cannot allocate memory
      # tail -f /var/log/messages
      [ 7372.278591] JBD: fallocate wants too many credits (2051 > 2048)
      [ 7372.278597] (fallocate,6438,0):__ocfs2_extend_allocation:709 ERROR: status = -12
      [ 7372.278603] (fallocate,6438,0):ocfs2_allocate_unwritten_extents:1504 ERROR: status = -12
      [ 7372.278607] (fallocate,6438,0):__ocfs2_change_file_space:1955 ERROR: status = -12
      ^C
      With this patch, the test works well.
      Signed-off-by: NYounger Liu <younger.liu@huawei.com>
      Cc: Jie Liu <jeff.liu@oracle.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2b1e55c3
  11. 29 6月, 2013 1 次提交
  12. 22 2月, 2013 1 次提交
  13. 31 7月, 2012 1 次提交
  14. 25 7月, 2011 2 次提交
  15. 14 5月, 2011 1 次提交
  16. 31 3月, 2011 1 次提交
  17. 24 2月, 2011 1 次提交
  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. 10 9月, 2010 3 次提交
  21. 04 8月, 2010 1 次提交
  22. 16 7月, 2010 1 次提交
    • J
      jbd2/ocfs2: Fix block checksumming when a buffer is used in several transactions · 13ceef09
      Jan Kara 提交于
      OCFS2 uses t_commit trigger to compute and store checksum of the just
      committed blocks. When a buffer has b_frozen_data, checksum is computed
      for it instead of b_data but this can result in an old checksum being
      written to the filesystem in the following scenario:
      
      1) transaction1 is opened
      2) handle1 is opened
      3) journal_access(handle1, bh)
          - This sets jh->b_transaction to transaction1
      4) modify(bh)
      5) journal_dirty(handle1, bh)
      6) handle1 is closed
      7) start committing transaction1, opening transaction2
      8) handle2 is opened
      9) journal_access(handle2, bh)
          - This copies off b_frozen_data to make it safe for transaction1 to commit.
            jh->b_next_transaction is set to transaction2.
      10) jbd2_journal_write_metadata() checksums b_frozen_data
      11) the journal correctly writes b_frozen_data to the disk journal
      12) handle2 is closed
          - There was no dirty call for the bh on handle2, so it is never queued for
            any more journal operation
      13) Checkpointing finally happens, and it just spools the bh via normal buffer
      writeback.  This will write b_data, which was never triggered on and thus
      contains a wrong (old) checksum.
      
      This patch fixes the problem by calling the trigger at the moment data is
      frozen for journal commit - i.e., either when b_frozen_data is created by
      do_get_write_access or just before we write a buffer to the log if
      b_frozen_data does not exist. We also rename the trigger to t_frozen as
      that better describes when it is called.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      13ceef09
  23. 16 6月, 2010 1 次提交
    • T
      ocfs2: Move orphan scan work to ocfs2_wq. · 40f165f4
      Tao Ma 提交于
      We used to let orphan scan work in the default work queue,
      but there is a corner case which will make the system deadlock.
      The scenario is like this:
      1. set heartbeat threadshold to 200. this will allow us to have a
         great chance to have a orphan scan work before our quorum decision.
      2. mount node 1.
      3. after 1~2 minutes, mount node 2(in order to make the bug easier
         to reproduce, better add maxcpus=1 to kernel command line).
      4. node 1 do orphan scan work.
      5. node 2 do orphan scan work.
      6. node 1 do orphan scan work. After this, node 1 hold the orphan scan
         lock while node 2 know node 1 is the master.
      7. ifdown eth2 in node 2(eth2 is what we do ocfs2 interconnection).
      
      Now when node 2 begins orphan scan, the system queue is blocked.
      
      The root cause is that both orphan scan work and quorum decision work
      will use the system event work queue. orphan scan has a chance of
      blocking the event work queue(in dlm_wait_for_node_death) so that there
      is no chance for quorum decision work to proceed.
      
      This patch resolve it by moving orphan scan work to ocfs2_wq.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      40f165f4
  24. 06 5月, 2010 2 次提交
    • 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
    • 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. 26 1月, 2010 1 次提交
  26. 04 12月, 2009 1 次提交