1. 18 4月, 2008 5 次提交
    • J
      ocfs2: Create the lock status block union. · 8f2c9c1b
      Joel Becker 提交于
      Wrap the lock status block (lksb) in a union.  Later we will add a union
      element for the fs/dlm lksb.  Create accessors for the status and lvb
      fields.
      
      Other than a debugging function, dlmglue.c does not directly reference
      the o2dlm locking path anymore.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      8f2c9c1b
    • J
      ocfs2: New slot map format · 386a2ef8
      Joel Becker 提交于
      The old slot map had a few limitations:
      
      - It was limited to one block, so the maximum slot count was 255.
      - Each slot was signed 16bits, limiting node numbers to INT16_MAX.
      - An empty slot was marked by the magic 0xFFFF (-1).
      
      The new slot map format provides 32bit node numbers (UINT32_MAX), a
      separate space to mark a slot in use, and extra room to grow.  The slot
      map is now bounded by i_size, not a block.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      386a2ef8
    • J
      ocfs2: De-magic the in-memory slot map. · fc881fa0
      Joel Becker 提交于
      The in-memory slot map uses the same magic as the on-disk one.  There is
      a special value to mark a slot as invalid.  It relies on the size of
      certain types and so on.
      
      Write a new in-memory map that keeps validity as a separate field.  Outside
      of the I/O functions, OCFS2_INVALID_SLOT now means what it is supposed to.
      It also is no longer tied to the type size.
      
      This also means that only the I/O functions refer to 16bit quantities.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      fc881fa0
    • J
      ocfs2: Change the recovery map to an array of node numbers. · 553abd04
      Joel Becker 提交于
      The old recovery map was a bitmap of node numbers.  This was sufficient
      for the maximum node number of 254.  Going forward, we want node numbers
      to be UINT32.  Thus, we need a new recovery map.
      
      Note that we can't keep track of slots here.  We must write down the
      node number to recovery *before* we get the locks needed to convert a
      node number into a slot number.
      
      The recovery map is now an array of unsigned ints, max_slots in size.
      It moves to journal.c with the rest of recovery.
      
      Because it needs to be initialized, we move all of recovery initialization
      into a new function, ocfs2_recovery_init().  This actually cleans up
      ocfs2_initialize_super() a little as well.  Following on, recovery cleaup
      becomes part of ocfs2_recovery_exit().
      
      A number of node map functions are rendered obsolete and are removed.
      
      Finally, waiting on recovery is wrapped in a function rather than naked
      checks on the recovery_event.  This is a cleanup from Mark.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      553abd04
    • J
      ocfs2: Make ocfs2_slot_info private. · d85b20e4
      Joel Becker 提交于
      Just use osb_lock around the ocfs2_slot_info data.  This allows us to
      take the ocfs2_slot_info structure private in slot_info.c.  All access
      is now via accessors.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      d85b20e4
  2. 09 2月, 2008 1 次提交
    • M
      byteorder: move le32_add_cpu & friends from OCFS2 to core · 8b5f6883
      Marcin Slusarz 提交于
      This patchset moves le*_add_cpu and be*_add_cpu functions from OCFS2 to core
      header (1st), converts ext3 filesystem to this API (2nd) and replaces XFS
      different named functions with new ones (3rd).
      
      There are many places where these functions will be useful.  Just look at:
      grep -r 'cpu_to_[ble12346]*([ble12346]*_to_cpu.*[-+]' linux-src/ Patch for
      ext3 is an example how conversions will probably look like.
      
      This patch:
      
      - move inline functions which add native byte order variable to
        little/big endian variable to core header
        * le16_add_cpu(__le16 *var, u16 val)
        * le32_add_cpu(__le32 *var, u32 val)
        * le64_add_cpu(__le64 *var, u64 val)
        * be32_add_cpu(__be32 *var, u32 val)
      - add for completeness:
        * be16_add_cpu(__be16 *var, u16 val)
        * be64_add_cpu(__be64 *var, u64 val)
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Acked-by: NMark Fasheh <mark.fasheh@oracle.com>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Timothy Shimmin <tes@sgi.com>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8b5f6883
  3. 07 2月, 2008 1 次提交
    • J
      ocfs2: Negotiate locking protocol versions. · d24fbcda
      Joel Becker 提交于
      Currently, when ocfs2 nodes connect via TCP, they advertise their
      compatibility level.  If the versions do not match, two nodes cannot speak
      to each other and they disconnect. As a result, this provides no forward or
      backwards compatibility.
      
      This patch implements a simple protocol negotiation at the dlm level by
      introducing a major/minor version number scheme for entities that
      communicate.  Specifically, o2dlm has a major/minor version for interaction
      with o2dlm on other nodes, and ocfs2 itself has a major/minor version for
      interacting with the filesystem on other nodes.
      
      This will allow rolling upgrades of ocfs2 clusters when changes to the
      locking or network protocols can be done in a backwards compatible manner.
      In those cases, only the minor number is changed and the negotatied protocol
      minor is returned from dlm join. In the far less likely event that a
      required protocol change makes backwards compatibility impossible, we simply
      bump the major number.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      d24fbcda
  4. 26 1月, 2008 6 次提交
    • M
      ocfs2: document access rules for blocked_lock_list · 7ec373cf
      Mark Fasheh 提交于
      ocfs2_super->blocked_lock_list and ocfs2_super->blocked_lock_count have some
      usage restrictions which aren't immediately obvious to anyone reading the
      code. It's a good idea to document this so that we avoid making costly
      mistakes in the future.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      7ec373cf
    • M
      [PATCH 2/2] ocfs2: cluster aware flock() · 53fc622b
      Mark Fasheh 提交于
      Hook up ocfs2_flock(), using the new flock lock type in dlmglue.c. A new
      mount option, "localflocks" is added so that users can revert to old
      functionality as need be.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      53fc622b
    • M
      [PATCH 1/2] ocfs2: add flock lock type · cf8e06f1
      Mark Fasheh 提交于
      This adds a new dlmglue lock type which is intended to back flock()
      requests.
      
      Since these locks are driven from userspace, usage rules are much more
      liberal than the typical Ocfs2 internal cluster lock. As a result, we can't
      make use of most dlmglue features - lock caching and lock level
      optimizations in particular. Additionally, userspace is free to deadlock
      itself, so we have to deal with that in the same way as the rest of the
      kernel - by allowing a signal to abort a lock request.
      
      In order to keep ocfs2_cluster_lock() complexity down, ocfs2_file_lock()
      does it's own dlm coordination. We still use the same helper functions
      though, so duplicated code is kept to a minimum.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      cf8e06f1
    • S
      ocfs2: Local alloc window size changeable via mount option · 2fbe8d1e
      Sunil Mushran 提交于
      Local alloc is a performance optimization in ocfs2 in which a node
      takes a window of bits from the global bitmap and then uses that for
      all small local allocations. This window size is fixed to 8MB currently.
      This patch allows users to specify the window size in MB including
      disabling it by passing in 0. If the number specified is too large,
      the fs will use the default value of 8MB.
      
      mount -o localalloc=X /dev/sdX /mntpoint
      Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      2fbe8d1e
    • M
      ocfs2: Support commit= mount option · d147b3d6
      Mark Fasheh 提交于
      Mostly taken from ext3. This allows the user to set the jbd commit interval,
      in seconds. The default of 5 seconds stays the same, but now users can
      easily increase the commit interval. Typically, this would be increased in
      order to benefit performance at the expense of data-safety.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      d147b3d6
    • M
      ocfs2: Remove mount/unmount votes · 34d024f8
      Mark Fasheh 提交于
      The node maps that are set/unset by these votes are no longer relevant, thus
      we can remove the mount and umount votes. Since those are the last two
      remaining votes, we can also remove the entire vote infrastructure.
      
      The vote thread has been renamed to the downconvert thread, and the small
      amount of functionality related to managing it has been moved into
      fs/ocfs2/dlmglue.c. All references to votes have been removed or updated.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      34d024f8
  5. 13 10月, 2007 1 次提交
  6. 10 8月, 2007 1 次提交
  7. 11 7月, 2007 2 次提交
  8. 03 5月, 2007 1 次提交
  9. 27 4月, 2007 4 次提交
    • M
      ocfs2: zero tail of sparse files on truncate · 60b11392
      Mark Fasheh 提交于
      Since we don't zero on extend anymore, truncate needs to be fixed up to zero
      the part of a file between i_size and and end of it's cluster. Otherwise a
      subsequent extend could expose bad data.
      
      This introduced a new helper, which can be used in ocfs2_write().
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      60b11392
    • M
      ocfs2: teach ocfs2_file_aio_write() about sparse files · 9517bac6
      Mark Fasheh 提交于
      Unfortunately, ocfs2 can no longer make use of generic_file_aio_write_nlock()
      because allocating writes will require zeroing of pages adjacent to the I/O
      for cluster sizes greater than page size.
      
      Implement a custom file write here, which can order page locks for zeroing.
      This also has the advantage that cluster locks can easily be ordered outside
      of the page locks.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      9517bac6
    • M
      ocfs2: temporarily remove extent map caching · 363041a5
      Mark Fasheh 提交于
      The code in extent_map.c is not prepared to deal with a subtree being
      rotated between lookups. This can happen when filling holes in sparse files.
      Instead of a lengthy patch to update the code (which would likely lose the
      benefit of caching subtree roots), we remove most of the algorithms and
      implement a simple path based lookup. A less ambitious extent caching scheme
      will be added in a later patch.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      363041a5
    • M
      ocfs2: sparse b-tree support · dcd0538f
      Mark Fasheh 提交于
      Introduce tree rotations into the b-tree code. This will allow ocfs2 to
      support sparse files. Much of the added code is designed to be generic (in
      the ocfs2 sense) so that it can later be re-used to implement large
      extended attributes.
      
      This patch only adds the rotation code and does minimal updates to callers
      of the extent api.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      dcd0538f
  10. 08 12月, 2006 1 次提交
  11. 02 12月, 2006 2 次提交
  12. 22 11月, 2006 1 次提交
  13. 08 8月, 2006 2 次提交
  14. 30 6月, 2006 1 次提交
  15. 25 3月, 2006 1 次提交
  16. 02 3月, 2006 2 次提交
  17. 04 2月, 2006 1 次提交
  18. 04 1月, 2006 1 次提交