1. 10 10月, 2014 2 次提交
  2. 07 8月, 2014 1 次提交
  3. 05 6月, 2014 2 次提交
    • X
      ocfs2: remove some unused code · e72db989
      Xue jiufei 提交于
      dlm_recovery_ctxt.received is unused.
      
      ocfs2_should_refresh_lock_res() can only return 0 or 1, so the error
      handling code in ocfs2_super_lock() is unneeded.
      Signed-off-by: Njoyce.xue <xuejiufei@huawei.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>
      e72db989
    • X
      ocfs2/dlm: disallow node joining when recovery is on going · 01c6222f
      Xue jiufei 提交于
      We found a race situation when dlm recovery and node joining occurs
      simultaneously if the network state is bad.
      
      N1                                      N4
      
      start joining dlm and send
      query join to all live nodes
                                  set joining node to N1, return OK
      send query join to other
      live nodes and it may take
      a while
      
      call dlm_send_join_assert()
      to send assert join message
      when N2 is down, so keep
      trying to send message to N2
      until find N2 is down
      
      send assert join message to
      N3, but connection is down
      with N3, so it may take a
      while
                                  become the recovery master for N2
                                  and send begin reco message to other
                                  nodes in domain map but no N1
      connection with N3 is rebuild,
      then send assert join to N4
                                  call dlm_assert_joined_handler(),
                                  add N1 to domain_map
      
                                  dlm recovery done, send finalize message
                                  to nodes in domain map, including N1
      receiving finalize message,
      trigger the BUG() because
      recovery master mismatch.
      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>
      01c6222f
  4. 04 4月, 2014 2 次提交
  5. 22 1月, 2014 1 次提交
  6. 12 9月, 2013 1 次提交
  7. 22 2月, 2013 1 次提交
  8. 30 5月, 2012 1 次提交
  9. 25 7月, 2011 3 次提交
  10. 26 5月, 2011 2 次提交
    • S
      ocfs2/dlm: Do not migrate resource to a node that is leaving the domain · 66effd3c
      Sunil Mushran 提交于
      During dlm domain shutdown, o2dlm has to free all the lock resources. Ones that
      have no locks and references are freed. Ones that have locks and/or references
      are migrated to another node.
      
      The first task in migration is finding a target. Currently we scan the lock
      resource and find one node that either has a lock or a reference. This is not
      very efficient in a parallel umount case as we might end up migrating the
      lock resource to a node which itself may have to migrate it to a third node.
      
      The patch scans the dlm->exit_domain_map to ensure the target node is not
      leaving the domain. If no valid target node is found, o2dlm does not migrate
      the resource but instead waits for the unlock and deref messages that will
      allow it to free the resource.
      Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com>
      Signed-off-by: NJoel Becker <jlbec@evilplan.org>
      66effd3c
    • S
      ocfs2/dlm: Add new dlm message DLM_BEGIN_EXIT_DOMAIN_MSG · bddefdee
      Sunil Mushran 提交于
      This patch adds a new dlm message DLM_BEGIN_EXIT_DOMAIN_MSG and ups the dlm
      protocol to 1.2.
      
      o2dlm sends this new message in dlm_unregister_domain() to mark the beginning
      of the exit domain. This message is sent to all nodes in the domain.
      
      Currently o2dlm has no way of informing other nodes of its impending exit.
      This information is useful as the other nodes could disregard the exiting
      node in certain operations. For example, in resource migration. If two or
      more nodes were umounting in parallel, it would be more efficient if o2dlm
      were to choose a non-exiting node to be the new master node rather than an
      exiting one.
      Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com>
      Reviewed-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NJoel Becker <jlbec@evilplan.org>
      bddefdee
  11. 14 5月, 2011 1 次提交
  12. 22 2月, 2011 1 次提交
  13. 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
  14. 16 12月, 2010 2 次提交
  15. 19 11月, 2010 1 次提交
    • D
      fs/ocfs2/dlm: Use GFP_ATOMIC under spin_lock · a48a982a
      David Sterba 提交于
      coccinelle check scripts/coccinelle/locks/call_kern.cocci found that
      in fs/ocfs2/dlm/dlmdomain.c an allocation with GFP_KERNEL is done
      with locks held:
      
      dlm_query_region_handler
        spin_lock(dlm_domain_lock)
          dlm_match_regions
            kmalloc(GFP_KERNEL)
      
      Change it to GFP_ATOMIC.
      Signed-off-by: NDavid Sterba <dsterba@suse.cz>
      CC: Joel Becker <joel.becker@oracle.com>
      CC: Mark Fasheh <mfasheh@suse.com>
      CC: ocfs2-devel@oss.oracle.com
      
      --
      Exists in v2.6.37-rc1 and current linux-next.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      a48a982a
  16. 10 10月, 2010 1 次提交
  17. 08 10月, 2010 1 次提交
    • S
      · 18cfdf1b
      Sunil Mushran 提交于
      ocfs2/dlm: Add message DLM_QUERY_NODEINFO
      
      Adds new dlm message DLM_QUERY_NODEINFO that sends the attributes of all
      registered nodes. This message is sent if the negotiated dlm protocol is
      1.1 or higher. If the information of the joining node does not match
      that of any existing nodes, the join domain request is rejected.
      Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com>
      18cfdf1b
  18. 10 10月, 2010 1 次提交
    • S
      · ea203441
      Sunil Mushran 提交于
      ocfs2/dlm: Add message DLM_QUERY_REGION
      
      Adds new dlm message DLM_QUERY_REGION that sends the names of all active
      heartbeat regions. This message is only sent in the global heartbeat
      mode. If the regions in the joining node do not fully match the ones in
      the active nodes, the join domain request is rejected.
      Signed-off-by: NSunil Mushran <sunil.mushran@oracle.com>
      ea203441
  19. 24 9月, 2010 1 次提交
  20. 13 7月, 2010 1 次提交
    • D
      ocfs2: tighten up strlen() checking · e372357b
      Dan Carpenter 提交于
      This function is only called from one place and it's like this:
      	dlm_register_domain(conn->cc_name, dlm_key, &fs_version);
      
      The "conn->cc_name" is 64 characters long.  If strlen(conn->cc_name)
      were equal to O2NM_MAX_NAME_LEN (64) that would be a bug because
      strlen() doesn't count the NULL character.
      
      In fact, if you look how O2NM_MAX_NAME_LEN is used, it mostly describes
      64 character buffers.  The only exception is nd_name from struct
      o2nm_node.
      
      Anyway I looked into it and in this case the domain string comes from
      osb->uuid_str in ocfs2_setup_osb_uuid().  That's 32 characters and NULL
      which easily fits into O2NM_MAX_NAME_LEN.  This patch doesn't change how
      the code works, but I think it makes the code a little cleaner.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      e372357b
  21. 16 6月, 2010 1 次提交
  22. 19 5月, 2010 1 次提交
    • J
      fs/ocfs2/dlm: Use kstrdup · 316ce2ba
      Julia Lawall 提交于
      Use kstrdup when the goal of an allocation is copy a string into the
      allocated region.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression from,to;
      expression flag,E1,E2;
      statement S;
      @@
      
      -  to = kmalloc(strlen(from) + 1,flag);
      +  to = kstrdup(from, flag);
         ... when != \(from = E1 \| to = E1 \)
         if (to==NULL || ...) S
         ... when != \(from = E2 \| to = E2 \)
      -  strcpy(to, from);
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      316ce2ba
  23. 06 5月, 2010 2 次提交
  24. 26 1月, 2010 1 次提交
  25. 24 9月, 2009 1 次提交
  26. 04 4月, 2009 4 次提交
  27. 06 1月, 2009 1 次提交
  28. 18 4月, 2008 2 次提交