|
static bool | file_lock_equal (const struct m0_rm_resource *resource0, const struct m0_rm_resource *resource1) |
|
static m0_bcount_t | file_lock_len (const struct m0_rm_resource *resource) |
|
static int | file_lock_encode (struct m0_bufvec_cursor *cur, const struct m0_rm_resource *resource) |
|
static int | file_lock_decode (struct m0_bufvec_cursor *cur, struct m0_rm_resource **resource) |
|
static void | file_lock_credit_init (struct m0_rm_resource *resource, struct m0_rm_credit *credit) |
|
static void | file_lock_resource_free (struct m0_rm_resource *resource) |
|
static void | file_lock_incoming_complete (struct m0_rm_incoming *in, int32_t rc) |
|
static void | file_lock_incoming_conflict (struct m0_rm_incoming *in) |
|
static bool | file_lock_cr_intersects (const struct m0_rm_credit *self, const struct m0_rm_credit *c1) |
|
static m0_bcount_t | file_lock_cr_len (const struct m0_rm_credit *c0) |
|
static int | file_lock_cr_join (struct m0_rm_credit *self, const struct m0_rm_credit *c1) |
|
static int | file_lock_cr_disjoin (struct m0_rm_credit *self, const struct m0_rm_credit *c1, struct m0_rm_credit *intersection) |
|
static int | file_lock_cr_copy (struct m0_rm_credit *dest, const struct m0_rm_credit *self) |
|
static int | file_lock_cr_diff (struct m0_rm_credit *self, const struct m0_rm_credit *c1) |
|
static bool | file_lock_cr_conflicts (const struct m0_rm_credit *self, const struct m0_rm_credit *c1) |
|
static bool | file_lock_cr_is_subset (const struct m0_rm_credit *self, const struct m0_rm_credit *c1) |
|
static int | file_lock_cr_encode (struct m0_rm_credit *self, struct m0_bufvec_cursor *cur) |
|
static int | file_lock_cr_decode (struct m0_rm_credit *self, struct m0_bufvec_cursor *cur) |
|
static void | file_lock_cr_free (struct m0_rm_credit *self) |
|
static void | file_lock_cr_initial_capital (struct m0_rm_credit *self) |
|
static int | file_lock_encdec (struct m0_file *file, struct m0_bufvec_cursor *cur, enum m0_xcode_what what) |
|
static bool | file_lock_credit_invariant (const struct m0_rm_credit *file_cr) |
|
static int | file_lock_cr_encdec (struct m0_rm_credit *self, struct m0_bufvec_cursor *cur, enum m0_xcode_what what) |
|
This section contains the functions that are internal to the distributed file lock. They implement various resource manager ops.
- See also
- Overview and Logical Specification
◆ R_F
◆ file_lock_cr_conflicts()
◆ file_lock_cr_copy()
◆ file_lock_cr_decode()
◆ file_lock_cr_diff()
◆ file_lock_cr_disjoin()
◆ file_lock_cr_encdec()
◆ file_lock_cr_encode()
◆ file_lock_cr_free()
◆ file_lock_cr_initial_capital()
static void file_lock_cr_initial_capital |
( |
struct m0_rm_credit * |
self | ) |
|
|
static |
◆ file_lock_cr_intersects()
◆ file_lock_cr_is_subset()
◆ file_lock_cr_join()
◆ file_lock_cr_len()
◆ file_lock_credit_init()
Initialises credit (lock state) and ops vector for the file_lock
Definition at line 321 of file file.c.
◆ file_lock_credit_invariant()
static bool file_lock_credit_invariant |
( |
const struct m0_rm_credit * |
file_cr | ) |
|
|
static |
◆ file_lock_decode()
Decode file_lock - from the wire
Definition at line 295 of file file.c.
◆ file_lock_encdec()
- Todo:
- ->rto_decode() decode for file resource should create an entire ambient object: an inode on client and a cob on server.
Definition at line 258 of file file.c.
◆ file_lock_encode()
Encode file_lock - ready to send over the wire
Definition at line 280 of file file.c.
◆ file_lock_equal()
Compare Ids of two file locks
Definition at line 223 of file file.c.
◆ file_lock_incoming_complete()
static void file_lock_incoming_complete |
( |
struct m0_rm_incoming * |
in, |
|
|
int32_t |
rc |
|
) |
| |
|
static |
Lock request completion callback
Definition at line 339 of file file.c.
◆ file_lock_incoming_conflict()
Lock request conflict callback
Definition at line 346 of file file.c.
◆ file_lock_len()
◆ file_lock_resource_free()
static void file_lock_resource_free |
( |
struct m0_rm_resource * |
resource | ) |
|
|
static |
◆ file_lock_credit_ops
Initial value:= {
}
static void file_lock_cr_free(struct m0_rm_credit *self)
static int file_lock_cr_copy(struct m0_rm_credit *dest, const struct m0_rm_credit *self)
static int file_lock_cr_join(struct m0_rm_credit *self, const struct m0_rm_credit *c1)
static m0_bcount_t file_lock_cr_len(const struct m0_rm_credit *c0)
static bool file_lock_cr_intersects(const struct m0_rm_credit *self, const struct m0_rm_credit *c1)
static int file_lock_cr_decode(struct m0_rm_credit *self, struct m0_bufvec_cursor *cur)
static int file_lock_cr_diff(struct m0_rm_credit *self, const struct m0_rm_credit *c1)
static int file_lock_cr_disjoin(struct m0_rm_credit *self, const struct m0_rm_credit *c1, struct m0_rm_credit *intersection)
static bool file_lock_cr_conflicts(const struct m0_rm_credit *self, const struct m0_rm_credit *c1)
static void file_lock_cr_initial_capital(struct m0_rm_credit *self)
static bool file_lock_cr_is_subset(const struct m0_rm_credit *self, const struct m0_rm_credit *c1)
static int file_lock_cr_encode(struct m0_rm_credit *self, struct m0_bufvec_cursor *cur)
Definition at line 200 of file file.c.
◆ file_lock_incoming_ops
Initial value:= {
}
static void file_lock_incoming_complete(struct m0_rm_incoming *in, int32_t rc)
static void file_lock_incoming_conflict(struct m0_rm_incoming *in)
Definition at line 215 of file file.c.
◆ file_lock_ops
Initial value:= {
}
static void file_lock_credit_init(struct m0_rm_resource *resource, struct m0_rm_credit *credit)
static void file_lock_resource_free(struct m0_rm_resource *resource)
Definition at line 195 of file file.c.
◆ file_lock_type_ops
Initial value:= {
}
static int file_lock_encode(struct m0_bufvec_cursor *cur, const struct m0_rm_resource *resource)
static int file_lock_decode(struct m0_bufvec_cursor *cur, struct m0_rm_resource **resource)
static m0_bcount_t file_lock_len(const struct m0_rm_resource *resource)
static bool file_lock_equal(const struct m0_rm_resource *resource0, const struct m0_rm_resource *resource1)
Definition at line 188 of file file.c.