1. 27 2月, 2010 2 次提交
    • J
      ocfs2: Attach the connection to the lksb · c0e41338
      Joel Becker 提交于
      We're going to want it in the ast functions, so we convert union
      ocfs2_dlm_lksb to struct ocfs2_dlm_lksb and let it carry the connection.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      c0e41338
    • J
      ocfs2: Pass lksbs back from stackglue ast/bast functions. · a796d286
      Joel Becker 提交于
      The stackglue ast and bast functions tried to maintain the fiction that
      their arguments were void pointers.  In reality, stack_user.c had to
      know that the argument was an ocfs2_lock_res in order to get the status
      off of the lksb.  That's ugly.
      
      This changes stackglue to always pass the lksb as the argument to ast
      and bast functions.  The caller can always use container_of() to get the
      ocfs2_lock_res or user_dlm_lock_res.  The net effect to the caller is
      zero.  They still get back the lockres in their ast.  stackglue gets
      cleaner, and now can use the lksb itself.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      a796d286
  2. 23 6月, 2009 1 次提交
    • J
      ocfs2: Provide the ocfs2_dlm_lvb_valid() stack API. · 1c520dfb
      Joel Becker 提交于
      The Lock Value Block (LVB) of a DLM lock can be lost when nodes die and
      the DLM cannot reconstruct its state.  Clients of the DLM need to know
      this.
      
      ocfs2's internal DLM, o2dlm, explicitly zeroes out the LVB when it loses
      track of the state.  This is not a standard behavior, but ocfs2 has
      always relied on it.  Thus, an o2dlm LVB is always "valid".
      
      ocfs2 now supports both o2dlm and fs/dlm via the stack glue.  When
      fs/dlm loses track of an LVBs state, it sets a flag
      (DLM_SBF_VALNOTVALID) on the Lock Status Block (LKSB).  The contents of
      the LVB may be garbage or merely stale.
      
      ocfs2 doesn't want to try to guess at the validity of the stale LVB.
      Instead, it should be checking the VALNOTVALID flag.  As this is the
      'standard' way of treating LVBs, we will promote this behavior.
      
      We add a stack glue API ocfs2_dlm_lvb_valid().  It returns non-zero when
      the LVB is valid.  o2dlm will always return valid, while fs/dlm will
      check VALNOTVALID.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Acked-by: NMark Fasheh <mfasheh@suse.com>
      1c520dfb
  3. 14 10月, 2008 1 次提交
    • M
      ocfs2: POSIX file locks support · 53da4939
      Mark Fasheh 提交于
      This is actually pretty easy since fs/dlm already handles the bulk of the
      work. The Ocfs2 userspace cluster stack module already uses fs/dlm as the
      underlying lock manager, so I only had to add the right calls.
      
      Cluster-aware POSIX locks ("plocks") can be turned off by the same means at
      UNIX locks - mount with 'noflocks', or create a local-only Ocfs2 volume.
      Internally, the file system uses two sets of file_operations, depending on
      whether cluster aware plocks is required. This turns out to be easier than
      implementing local-only versions of ->lock.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      53da4939
  4. 17 6月, 2008 3 次提交
  5. 18 4月, 2008 13 次提交