Motr  M0
obj_lock.c File Reference
#include "lib/trace.h"
#include "motr/client.h"
#include "motr/client_internal.h"
#include "motr/io.h"
#include "ioservice/fid_convert.h"
Include dependency graph for obj_lock.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 

Functions

static void rm_ctx_init (struct m0_rm_lock_ctx *ctx, struct m0_client *m0c, struct m0_fid *fid)
 
static void rm_ctx_fini (struct m0_ref *ref)
 
static void rm_lock_req_init (struct m0_clink *clink, struct m0_rm_owner *owner, struct m0_rm_lock_req *req, enum m0_rm_rwlock_req_type rw_type)
 
static void rm_lock_req_fini (struct m0_rm_lock_req *req)
 
static void obj_lock_incoming_complete (struct m0_rm_incoming *in, int32_t rc)
 
static void obj_lock_incoming_conflict (struct m0_rm_incoming *in)
 
static bool rm_key_eq (const void *key1, const void *key2)
 
static uint64_t rm_hash_func (const struct m0_htable *htable, const void *k)
 
 M0_HT_DESCR_DEFINE (rm_ctx, "Hash-table for RM locks", M0_INTERNAL, struct m0_rm_lock_ctx, rmc_hlink, rmc_magic, M0_RM_MAGIC, M0_RM_HEAD_MAGIC, rmc_key, rm_hash_func, rm_key_eq)
 
 M0_HT_DEFINE (rm_ctx, M0_INTERNAL, struct m0_rm_lock_ctx, struct m0_fid)
 
int m0_obj_lock_init (struct m0_obj *obj)
 
void m0_obj_lock_fini (struct m0_obj *obj)
 
M0_INTERNAL int m0_obj_lock_get (struct m0_obj *obj, struct m0_rm_lock_req *req, struct m0_clink *clink, enum m0_rm_rwlock_req_type rw_type)
 
M0_INTERNAL int m0_obj_lock_get_sync (struct m0_obj *obj, struct m0_rm_lock_req *req, enum m0_rm_rwlock_req_type rw_type)
 
int m0_obj_write_lock_get (struct m0_obj *obj, struct m0_rm_lock_req *req, struct m0_clink *clink)
 
int m0_obj_write_lock_get_sync (struct m0_obj *obj, struct m0_rm_lock_req *req)
 
int m0_obj_read_lock_get (struct m0_obj *obj, struct m0_rm_lock_req *req, struct m0_clink *clink)
 
int m0_obj_read_lock_get_sync (struct m0_obj *obj, struct m0_rm_lock_req *req)
 
void m0_obj_lock_put (struct m0_rm_lock_req *req)
 

Variables

const struct m0_rm_incoming_ops obj_lock_incoming_ops