1. 08 Feb, 2008 1 commit
    • Marcin Slusarz's avatar
      byteorder: move le32_add_cpu & friends from OCFS2 to core · 8b5f6883
      Marcin Slusarz authored
      
      
      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: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Acked-by: default avatarMark 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8b5f6883
  2. 06 Feb, 2008 1 commit
    • Joel Becker's avatar
      ocfs2: Negotiate locking protocol versions. · d24fbcda
      Joel Becker authored
      
      
      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: default avatarJoel Becker <joel.becker@oracle.com>
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      d24fbcda
  3. 28 Jan, 2008 1 commit
  4. 25 Jan, 2008 4 commits
    • Mark Fasheh's avatar
      ocfs2: bump version number · 0e5ae032
      Mark Fasheh authored
      
      
      Bump the printed version to 1.5.0. This helps us quickly identify which
      version of Ocfs2 a bug filer is running.
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      0e5ae032
    • Sunil Mushran's avatar
      ocfs2: Update default cluster timeouts · 17104683
      Sunil Mushran authored
      
      
      Lots of people are having trouble with the default timeouts, which are too
      low. These new values are derived from an informal survey taken on
      ocfs2-users, as well as data from bug reports. This should reduce the amount
      of cluster disconnects and subsequent fencing seen during normal workloads.
      Signed-off-by: default avatarSunil Mushran <sunil.mushran@oracle.com>
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      17104683
    • Mark Fasheh's avatar
      ocfs2: Remove data locks · c934a92d
      Mark Fasheh authored
      
      
      The meta lock now covers both meta data and data, so this just removes the
      now-redundant data lock.
      
      Combining locks saves us a round of lock mastery per inode and one less lock
      to ping between nodes during read/write.
      
      We don't lose much - since meta locks were always held before a data lock
      (and at the same level) ordered writeout mode (the default) ensured that
      flushing for the meta data lock also pushed out data anyways.
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      c934a92d
    • Mark Fasheh's avatar
      ocfs2: Remove mount/unmount votes · 34d024f8
      Mark Fasheh authored
      
      
      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: default avatarMark Fasheh <mark.fasheh@oracle.com>
      34d024f8
  5. 24 Jan, 2008 2 commits
    • Greg Kroah-Hartman's avatar
      kset: convert ocfs2 to use kset_create · c60b7178
      Greg Kroah-Hartman authored
      
      
      Dynamically create the kset instead of declaring it statically.
      
      Also use the new kobj_attribute which cleans up this file a _lot_.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Kurt Hackel <kurt.hackel@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c60b7178
    • Greg Kroah-Hartman's avatar
      kobject: remove struct kobj_type from struct kset · 3514faca
      Greg Kroah-Hartman authored
      
      
      We don't need a "default" ktype for a kset.  We should set this
      explicitly every time for each kset.  This change is needed so that we
      can make ksets dynamic, and cleans up one of the odd, undocumented
      assumption that the kset/kobject/ktype model has.
      
      This patch is based on a lot of help from Kay Sievers.
      
      Nasty bug in the block code was found by Dave Young
      <hidave.darkstar@gmail.com>
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Dave Young <hidave.darkstar@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3514faca
  6. 05 Dec, 2007 1 commit
  7. 27 Nov, 2007 1 commit
  8. 12 Nov, 2007 1 commit
  9. 06 Nov, 2007 1 commit
  10. 19 Oct, 2007 1 commit
  11. 12 Oct, 2007 2 commits
  12. 10 Oct, 2007 1 commit
  13. 09 Aug, 2007 1 commit
  14. 11 Jul, 2007 1 commit
    • Tejun Heo's avatar
      sysfs: kill unnecessary attribute->owner · 7b595756
      Tejun Heo authored
      sysfs is now completely out of driver/module lifetime game.  After
      deletion, a sysfs node doesn't access anything outside sysfs proper,
      so there's no reason to hold onto the attribute owners.  Note that
      often the wrong modules were accounted for as owners leading to
      accessing removed modules.
      
      This patch kills now unnecessary attribute->owner.  Note that with
      this change, userland holding a sysfs node does not prevent the
      backing module from being unloaded.
      
      For more info regarding lifetime rule cleanup, please read the
      following message.
      
        http://article.gmane.org/gmane.linux.kernel/510293
      
      
      
      (tweaked by Greg to not delete the field just yet, to make it easier to
      merge things properly.)
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7b595756
  15. 10 Jul, 2007 5 commits
  16. 06 Jun, 2007 1 commit
  17. 10 May, 2007 1 commit
    • Randy Dunlap's avatar
      ocfs2: kobject/kset foobar · c4a7f5eb
      Randy Dunlap authored
      
      
      Fix gcc warning and Oops that it causes:
      
      fs/ocfs2/cluster/masklog.c:161: warning: assignment from incompatible pointer type
      [ 2776.204120] OCFS2 Node Manager 1.3.3
      [ 2776.211729] BUG: spinlock bad magic on CPU#0, modprobe/4424
      [ 2776.214269]  lock: ffff810021c8fe18, .magic: ffffffff, .owner: /6394416, .owner_cpu: 0
      [ 2776.217864] [ 2776.217865] Call Trace:
      [ 2776.219662]  [<ffffffff803426c8>] spin_bug+0x9e/0xe9
      [ 2776.221921]  [<ffffffff803427bf>] _raw_spin_lock+0x23/0xf9
      [ 2776.224417]  [<ffffffff8051acf4>] _spin_lock+0x9/0xb
      [ 2776.226676]  [<ffffffff8033c3b1>] kobject_shadow_add+0x98/0x1ac
      [ 2776.229367]  [<ffffffff8033c4d0>] kobject_add+0xb/0xd
      [ 2776.231665]  [<ffffffff8033c4df>] kset_add+0xd/0xf
      [ 2776.233845]  [<ffffffff8033c5a6>] kset_register+0x23/0x28
      [ 2776.236309]  [<ffffffff8808ccb7>] :ocfs2_nodemanager:mlog_sys_init+0x68/0x6d
      [ 2776.239518]  [<ffffffff8808ccee>] :ocfs2_nodemanager:o2cb_sys_init+0x32/0x4a
      [ 2776.242726]  [<ffffffff880b80a6>] :ocfs2_nodemanager:init_o2nm+0xa6/0xd5
      [ 2776.245772]  [<ffffffff8025266c>] sys_init_module+0x1471/0x15d2
      [ 2776.248465]  [<ffffffff8033f250>] simple_strtoull+0x0/0xdc
      [ 2776.250959]  [<ffffffff8020948e>] system_call+0x7e/0x83
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c4a7f5eb
  18. 02 May, 2007 2 commits
  19. 26 Apr, 2007 2 commits
  20. 14 Mar, 2007 2 commits
  21. 14 Feb, 2007 2 commits
  22. 07 Feb, 2007 6 commits
    • Philipp Reisner's avatar
      [PATCH] ocfs2 heartbeat: clean up bio submission code · b559292e
      Philipp Reisner authored
      
      
      As was already pointed out Mathieu Avila on Thu, 07 Sep 2006 03:15:25 -0700
      that OCFS2 is expecting bio_add_page() to add pages to BIOs in an easily
      predictable manner.
      
      That is not true, especially for devices with own merge_bvec_fn().
      
      Therefore OCFS2's heartbeat code is very likely to fail on such devices.
      
      Move the bio_put() call into the bio's bi_end_io() function. This makes the
      whole idea of trying to predict the behaviour of bio_add_page() unnecessary.
      Removed compute_max_sectors() and o2hb_compute_request_limits().
      Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      b559292e
    • Zhen Wei's avatar
      ocfs2: introduce sc->sc_send_lock to protect outbound outbound messages · 925037bc
      Zhen Wei authored
      
      
      When there is a lot of multithreaded I/O usage, two threads can collide
      while sending out a message to the other nodes. This is due to the lack of
      locking between threads while sending out the messages.
      
      When a connected TCP send(), sendto(), or sendmsg() arrives in the Linux
      kernel, it eventually comes through tcp_sendmsg(). tcp_sendmsg() protects
      itself by acquiring a lock at invocation by calling lock_sock().
      tcp_sendmsg() then loops over the buffers in the iovec, allocating
      associated sk_buff's and cache pages for use in the actual send. As it does
      so, it pushes the data out to tcp for actual transmission. However, if one
      of those allocation fails (because a large number of large sends is being
      processed, for example), it must wait for memory to become available. It
      does so by jumping to wait_for_sndbuf or wait_for_memory, both of which
      eventually cause a call to sk_stream_wait_memory(). sk_stream_wait_memory()
      contains a code path that calls sk_wait_event(). Finally, sk_wait_event()
      contains the call to release_sock().
      
      The following patch adds a lock to the socket container in order to
      properly serialize outbound requests.
      
      From: Zhen Wei <zwei@novell.com>
      Acked-by: default avatarJeff Mahoney <jeffm@suse.com>
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      925037bc
    • Srinivas Eeda's avatar
      ocfs2_dlm: disallow a domain join if node maps mismatch · 1faf2894
      Srinivas Eeda authored
      
      
      There is a small window where a joining node may not see the node(s) that
      just died but are still part of the domain. To fix this, we must disallow
      join requests if the joining node has a different node map.
      
      A new field node_map is added to dlm_query_join_request to send the current
      nodes nodemap along with join request. On the receiving end the nodes that
      are part of the cluster verifies if this new node sees all the nodes that
      are still part of the cluster. They disallow the join if the maps mismatch.
      Signed-off-by: default avatarSrinivas Eeda <srinivas.eeda@oracle.com>
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      1faf2894
    • Sunil Mushran's avatar
      ocfs2: Binds listener to the configured ip address · ab81afd3
      Sunil Mushran authored
      
      
      This patch binds the o2net listener to the configured ip address
      instead of INADDR_ANY for security. Fixes oss.oracle.com bugzilla#814.
      Signed-off-by: default avatarSunil Mushran <sunil.mushran@oracle.com>
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      ab81afd3
    • Kurt Hackel's avatar
      ocfs2: Added post handler callable function in o2net message handler · d74c9803
      Kurt Hackel authored
      
      
      Currently o2net allows one handler function per message type. This
      patch adds the ability to call another function to be called after
      the handler has returned the message to the other node.
      
      Handlers are now given the option of returning a context (in the form of a
      void **) which will be passed back into the post message handler function.
      Signed-off-by: default avatarKurt Hackel <kurt.hackel@oracle.com>
      Signed-off-by: default avatarSunil Mushran <sunil.mushran@oracle.com>
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      d74c9803
    • Kurt Hackel's avatar
      ocfs2_dlm: fix cluster-wide refcounting of lock resources · ba2bf218
      Kurt Hackel authored
      
      
      This was previously broken and migration of some locks had to be temporarily
      disabled. We use a new (and backward-incompatible) set of network messages
      to account for all references to a lock resources held across the cluster.
      once these are all freed, the master node may then free the lock resource
      memory once its local references are dropped.
      Signed-off-by: default avatarKurt Hackel <kurt.hackel@oracle.com>
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      ba2bf218