1. 24 9月, 2010 1 次提交
  2. 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
  3. 16 6月, 2010 1 次提交
  4. 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
  5. 06 5月, 2010 2 次提交
  6. 26 1月, 2010 1 次提交
  7. 24 9月, 2009 1 次提交
  8. 04 4月, 2009 4 次提交
  9. 06 1月, 2009 1 次提交
  10. 18 4月, 2008 5 次提交
  11. 11 3月, 2008 2 次提交
  12. 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
  13. 11 7月, 2007 1 次提交
    • J
      ocfs2: Depend on configfs heartbeat items. · 14829422
      Joel Becker 提交于
      ocfs2 mounts require a heartbeat region.  Use the new configfs_depend_item()
      facility to actually depend on them so they can't go away from under us.
      
      First, teach cluster/nodemanager.c to depend an item on the o2cb subsystem.
      Then teach o2hb_register_callbacks to take a UUID and depend on the
      appropriate region.  Finally, teach all users of o2hb to pass a UUID or
      NULL if they don't require a pin.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      14829422
  14. 27 4月, 2007 2 次提交
  15. 27 3月, 2007 2 次提交
  16. 08 2月, 2007 6 次提交
  17. 14 12月, 2006 1 次提交
  18. 02 12月, 2006 1 次提交
  19. 22 11月, 2006 1 次提交
  20. 30 6月, 2006 1 次提交
  21. 28 6月, 2006 1 次提交
  22. 27 6月, 2006 3 次提交