|
enum | { M0_COB_NAME_MAX = 256,
M0_COB_EA_MAX = 4096
} |
|
enum | cob_table_optype { COB_TABLE_DELETE,
COB_TABLE_UPDATE,
COB_TABLE_INSERT
} |
|
enum | cob_table_kvtype {
COB_KVTYPE_OMG,
COB_KVTYPE_FAB,
COB_KVTYPE_FEA,
COB_KVTYPE_NS,
COB_KVTYPE_OI,
COB_KVTYPE_BC
} |
|
enum | { M0_MDS_COB_ID_START = 0,
M0_IOS_COB_ID_START = 1000
} |
|
enum | m0_cob_domain_format_version { M0_COB_DOMAIN_FORMAT_VERSION_1 = 1,
M0_COB_DOMAIN_FORMAT_VERSION = M0_COB_DOMAIN_FORMAT_VERSION_1
} |
|
enum | m0_cob_valid_flags {
M0_COB_ATIME = 1 << 0,
M0_COB_MTIME = 1 << 1,
M0_COB_CTIME = 1 << 2,
M0_COB_SIZE = 1 << 3,
M0_COB_MODE = 1 << 4,
M0_COB_UID = 1 << 5,
M0_COB_GID = 1 << 6,
M0_COB_BLOCKS = 1 << 7,
M0_COB_TYPE = 1 << 8,
M0_COB_FLAGS = 1 << 9,
M0_COB_NLINK = 1 << 10,
M0_COB_RDEV = 1 << 11,
M0_COB_BLKSIZE = 1 << 12,
M0_COB_LID = 1 << 13,
M0_COB_PVER = 1 << 14
} |
|
enum | m0_cob_nsrec_format_version { M0_COB_NSREC_FORMAT_VERSION_1 = 1,
M0_COB_NSREC_FORMAT_VERSION = M0_COB_NSREC_FORMAT_VERSION_1
} |
|
enum | m0_cob_flags {
M0_CA_NSKEY = (1 << 0),
M0_CA_NSKEY_FREE = (1 << 1),
M0_CA_NSREC = (1 << 2),
M0_CA_FABREC = (1 << 3),
M0_CA_OMGREC = (1 << 4),
M0_CA_LAYOUT = (1 << 5),
M0_CA_BCREC = (1 << 6)
} |
|
|
static int | cob0_init (struct m0_be_domain *dom, const char *suffix, const struct m0_buf *data) |
|
static void | cob0_fini (struct m0_be_domain *dom, const char *suffix, const struct m0_buf *data) |
|
M0_INTERNAL int | m0_cob_nskey_cmp (const struct m0_cob_nskey *k0, const struct m0_cob_nskey *k1) |
|
M0_INTERNAL size_t | m0_cob_nskey_size (const struct m0_cob_nskey *cnk) |
|
M0_INTERNAL int | m0_cob_eakey_make (struct m0_cob_eakey **keyh, const struct m0_fid *fid, const char *name, size_t namelen) |
|
static int | m0_cob_max_eakey_make (struct m0_cob_eakey **keyh, const struct m0_fid *fid, const char *name, int namelen) |
|
M0_INTERNAL int | m0_cob_eakey_cmp (const struct m0_cob_eakey *k0, const struct m0_cob_eakey *k1) |
|
M0_INTERNAL size_t | m0_cob_eakey_size (const struct m0_cob_eakey *cek) |
|
static size_t | m0_cob_earec_size (const struct m0_cob_earec *rec) |
|
M0_INTERNAL size_t | m0_cob_max_earec_size (void) |
|
static size_t | m0_cob_max_eakey_size (void) |
|
static size_t | m0_cob_fabrec_size (const struct m0_cob_fabrec *rec) |
|
static size_t | m0_cob_max_fabrec_size (void) |
|
static int | m0_cob_max_fabrec_make (struct m0_cob_fabrec **rech) |
|
static int | m0_cob_max_nskey_make (struct m0_cob_nskey **keyh, const struct m0_fid *pfid, const char *name, int namelen) |
|
static size_t | m0_cob_max_nskey_size (void) |
|
static int | ns_cmp (const void *key0, const void *key1) |
|
static m0_bcount_t | ns_ksize (const void *key) |
|
static m0_bcount_t | ns_vsize (const void *val) |
|
static size_t | m0_cob_bckey_size (void) |
|
static size_t | m0_cob_bcrec_size (void) |
|
static m0_bcount_t | bc_ksize (const void *key) |
|
static m0_bcount_t | bc_vsize (const void *val) |
|
static int | m0_cob_bckey_make (struct m0_cob_bckey **keyh, const struct m0_fid *pver_fid, uint64_t user_id) |
|
M0_INTERNAL int | m0_cob_bckey_cmp (const struct m0_cob_bckey *k0, const struct m0_cob_bckey *k1) |
|
static int | bc_cmp (const void *key0, const void *key1) |
|
static int | oi_cmp (const void *key0, const void *key1) |
|
static m0_bcount_t | oi_ksize (const void *key) |
|
static int | fb_cmp (const void *key0, const void *key1) |
|
static m0_bcount_t | fb_ksize (const void *key) |
|
static m0_bcount_t | fb_vsize (const void *val) |
|
static int | ea_cmp (const void *key0, const void *key1) |
|
static m0_bcount_t | ea_ksize (const void *key) |
|
static m0_bcount_t | ea_vsize (const void *val) |
|
static int | omg_cmp (const void *key0, const void *key1) |
|
static m0_bcount_t | omg_ksize (const void *key) |
|
static m0_bcount_t | omg_vsize (const void *val) |
|
static M0_UNUSED char * | cob_dom_id_make (char *buf, const struct m0_cob_domain_id *id, const char *prefix) |
|
int | m0_cob_domain_init (struct m0_cob_domain *dom, struct m0_be_seg *seg) |
|
void | m0_cob_domain_fini (struct m0_cob_domain *dom) |
|
static void | cob_domain_id2str (char **s, const struct m0_cob_domain_id *cdid) |
|
M0_INTERNAL int | m0_cob_domain_credit_add (struct m0_cob_domain *dom, struct m0_be_domain *bedom, struct m0_be_seg *seg, const struct m0_cob_domain_id *cdid, struct m0_be_tx_credit *cred) |
|
M0_INTERNAL int | m0_cob_domain_create_prepared (struct m0_cob_domain **out, struct m0_sm_group *grp, const struct m0_cob_domain_id *cdid, struct m0_be_domain *bedom, struct m0_be_seg *seg, struct m0_be_tx *tx) |
|
int | m0_cob_domain_create (struct m0_cob_domain **dom, struct m0_sm_group *grp, const struct m0_cob_domain_id *cdid, struct m0_be_domain *bedom, struct m0_be_seg *seg) |
|
int | m0_cob_domain_destroy (struct m0_cob_domain *dom, struct m0_sm_group *grp, struct m0_be_domain *bedom) |
|
static int | cob_table_delete (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_buf *key) |
|
static int | cob_table_update (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_buf *key, struct m0_buf *val) |
|
static int | cob_table_insert (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_buf *key, struct m0_buf *val) |
|
static int | cob_table_lookup (struct m0_be_btree *tree, struct m0_buf *key, struct m0_buf *out) |
|
M0_INTERNAL int | m0_cob_domain_mkfs (struct m0_cob_domain *dom, const struct m0_fid *rootfid, struct m0_be_tx *tx) |
|
static void | cob_free_cb (struct m0_ref *ref) |
|
M0_INTERNAL void | m0_cob_init (struct m0_cob_domain *dom, struct m0_cob *cob) |
|
static void | cob_fini (struct m0_cob *cob) |
|
static int | cob_ns_lookup (struct m0_cob *cob) |
|
static int | cob_oi_lookup (struct m0_cob *cob) |
|
static int | cob_fab_lookup (struct m0_cob *cob) |
|
static int | cob_omg_lookup (struct m0_cob *cob) |
|
static int | cob_get_fabomg (struct m0_cob *cob, uint64_t flags) |
|
M0_INTERNAL int | m0_cob_lookup (struct m0_cob_domain *dom, struct m0_cob_nskey *nskey, uint64_t flags, struct m0_cob **out) |
|
M0_INTERNAL int | m0_cob_locate (struct m0_cob_domain *dom, struct m0_cob_oikey *oikey, uint64_t flags, struct m0_cob **out) |
|
static bool | m0_cob_is_valid (struct m0_cob *cob) |
|
M0_INTERNAL int | m0_cob_create (struct m0_cob *cob, struct m0_cob_nskey *nskey, struct m0_cob_nsrec *nsrec, struct m0_cob_fabrec *fabrec, struct m0_cob_omgrec *omgrec, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_delete (struct m0_cob *cob, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_delete_put (struct m0_cob *cob, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_update (struct m0_cob *cob, struct m0_cob_nsrec *nsrec, struct m0_cob_fabrec *fabrec, struct m0_cob_omgrec *omgrec, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_name_add (struct m0_cob *cob, struct m0_cob_nskey *nskey, struct m0_cob_nsrec *nsrec, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_name_del (struct m0_cob *cob, struct m0_cob_nskey *nskey, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_name_update (struct m0_cob *cob, struct m0_cob_nskey *srckey, struct m0_cob_nskey *tgtkey, struct m0_be_tx *tx) |
|
M0_INTERNAL void | m0_cob_nsrec_init (struct m0_cob_nsrec *nsrec) |
|
M0_INTERNAL int | m0_cob_ea_get (struct m0_cob *cob, struct m0_cob_eakey *eakey, struct m0_cob_earec *out, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_ea_set (struct m0_cob *cob, struct m0_cob_eakey *eakey, struct m0_cob_earec *earec, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_ea_del (struct m0_cob *cob, struct m0_cob_eakey *eakey, struct m0_be_tx *tx) |
|
static void | cob_table_tx_credit (struct m0_be_btree *tree, enum cob_table_optype t_optype, enum cob_table_kvtype t_kvtype, struct m0_be_tx_credit *accum) |
|
struct m0_cob_domain_id | M0_XCA_DOMAIN (be) |
|
|
Init cob iterator on passed and
|
enum | m0_cob_op {
M0_COB_OP_DOMAIN_MKFS,
M0_COB_OP_LOOKUP,
M0_COB_OP_LOCATE,
M0_COB_OP_CREATE,
M0_COB_OP_DELETE,
M0_COB_OP_TRUNCATE,
M0_COB_OP_DELETE_PUT,
M0_COB_OP_UPDATE,
M0_COB_OP_FEA_SET,
M0_COB_OP_FEA_DEL,
M0_COB_OP_NAME_ADD,
M0_COB_OP_NAME_DEL,
M0_COB_OP_NAME_UPDATE,
M0_COB_OP_BYTECOUNT_SET,
M0_COB_OP_BYTECOUNT_DEL,
M0_COB_OP_BYTECOUNT_UPDATE
} |
|
enum | m0_cob_type { M0_COB_IO,
M0_COB_MD
} |
|
const struct m0_fid_type | m0_cob_fid_type |
|
enum m0_cob_op | M0_XCA_ENUM |
|
const struct m0_fid_type | m0_cob_fid_type |
|
M0_INTERNAL const struct m0_fid * | m0_cob_fid (const struct m0_cob *cob) |
|
M0_INTERNAL int | m0_cob_mod_init (void) |
|
M0_INTERNAL void | m0_cob_mod_fini (void) |
|
M0_INTERNAL void | m0_cob_oikey_make (struct m0_cob_oikey *oikey, const struct m0_fid *fid, int linkno) |
|
M0_INTERNAL int | m0_cob_nskey_make (struct m0_cob_nskey **keyh, const struct m0_fid *pfid, const char *name, size_t namelen) |
|
M0_INTERNAL int | m0_cob_fabrec_make (struct m0_cob_fabrec **rech, const char *link, size_t linklen) |
|
M0_INTERNAL int | m0_cob_bc_iterator_init (struct m0_cob *cob, struct m0_cob_bc_iterator *it, const struct m0_fid *pver_fid, uint64_t user_id) |
|
M0_INTERNAL int | m0_cob_bc_iterator_get (struct m0_cob_bc_iterator *it) |
|
M0_INTERNAL int | m0_cob_bc_iterator_next (struct m0_cob_bc_iterator *it) |
|
M0_INTERNAL void | m0_cob_bc_iterator_fini (struct m0_cob_bc_iterator *it) |
|
M0_INTERNAL int | m0_cob_bc_entries_dump (struct m0_cob_domain *cdom, struct m0_buf **out_keys, struct m0_buf **out_recs, uint32_t *out_count) |
|
M0_INTERNAL void | m0_cob_get (struct m0_cob *cob) |
|
M0_INTERNAL void | m0_cob_put (struct m0_cob *cob) |
|
M0_INTERNAL int | m0_cob_alloc (struct m0_cob_domain *dom, struct m0_cob **out) |
|
M0_INTERNAL int | m0_cob_bc_lookup (struct m0_cob *cob, struct m0_cob_bckey *bc_key, struct m0_cob_bcrec *bc_rec) |
|
M0_INTERNAL int | m0_cob_bc_insert (struct m0_cob *cob, struct m0_cob_bckey *bc_key, struct m0_cob_bcrec *bc_val, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_bc_update (struct m0_cob *cob, struct m0_cob_bckey *bc_key, struct m0_cob_bcrec *bc_val, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_iterator_init (struct m0_cob *cob, struct m0_cob_iterator *it, struct m0_bitstring *name) |
|
M0_INTERNAL void | m0_cob_iterator_fini (struct m0_cob_iterator *it) |
|
M0_INTERNAL int | m0_cob_iterator_get (struct m0_cob_iterator *it) |
|
M0_INTERNAL int | m0_cob_iterator_next (struct m0_cob_iterator *it) |
|
M0_INTERNAL int | m0_cob_ea_iterator_init (struct m0_cob *cob, struct m0_cob_ea_iterator *it, struct m0_bitstring *name) |
|
M0_INTERNAL int | m0_cob_ea_iterator_get (struct m0_cob_ea_iterator *it) |
|
M0_INTERNAL int | m0_cob_ea_iterator_next (struct m0_cob_ea_iterator *it) |
|
M0_INTERNAL void | m0_cob_ea_iterator_fini (struct m0_cob_ea_iterator *it) |
|
M0_INTERNAL int | m0_cob_alloc_omgid (struct m0_cob_domain *dom, uint64_t *omgid) |
|
M0_INTERNAL int | m0_cob_setattr (struct m0_cob *cob, struct m0_cob_attr *attr, struct m0_be_tx *tx) |
|
M0_INTERNAL int | m0_cob_size_update (struct m0_cob *cob, uint64_t size, struct m0_be_tx *tx) |
|
M0_INTERNAL void | m0_cob_tx_credit (struct m0_cob_domain *dom, enum m0_cob_op optype, struct m0_be_tx_credit *accum) |
|
M0_INTERNAL void | m0_cob_ea_get_credit (struct m0_cob *cob, struct m0_cob_eakey *eakey, struct m0_cob_earec *out, struct m0_be_tx_credit *accum) |
|
M0_INTERNAL void | m0_cob_ea_set_credit (struct m0_cob *cob, struct m0_cob_eakey *eakey, struct m0_cob_earec *earec, struct m0_be_tx_credit *accum) |
|
M0_INTERNAL void | m0_cob_ea_del_credit (struct m0_cob *cob, struct m0_cob_eakey *eakey, struct m0_be_tx_credit *accum) |
|
M0_INTERNAL void | m0_cob_ea_iterator_init_credit (struct m0_cob *cob, struct m0_cob_ea_iterator *it, struct m0_bitstring *name, struct m0_be_tx_credit *accum) |
|
A Component object is a metadata layer that holds metadata information. It references a single storage object and contains metadata describing the object. The metadata is stored in database tables. A M0 Global Object (i.e. file) is made up of a collection of Component Objects (stripes).
Component object metadata includes:
- namespace information: parent object id, name, links;
- file attributes: owner/mode/group, size, m/a/ctime, acls;
- fol reference information: log sequence number (lsn), version counter.
Metadata organization:
COB uses four db tables for storing the following pieces of information:
- Namespace - stores file names and file attributes for readdir speedup. In case of "ls -al" request some metadata needed to complete it and it is why minimum necessary attributes are stored in namespace table;
- Object Index - stores links of file (all names of the file);
- File attributes - stores file version, some replicator fields, basically anything that is not needed during stat and readdir operations;
- One more table is needed for so called "omg" records (owner/mode/group). They store mode/uid/gid file attributes.
For traditional file systems' namespace we need two tables: name space and object index. These tables are used as following:
Suppose that there is a file F that has got three names:
"a/f0", "b/f1", "c/f2"
Then namespace will have the following records:
(a.fid, "f0") -> (F stat data, 0) (b.fid, "f1") -> (F, 1) (c.fid, "f2") -> (F, 2)
where, in first record, we have "DB key" constructed of f0's parent fid (the directory fid) and "f0", the filename itself. The namespace record contains the fid of file "f0" together with with its stat data, plus the link number for this name.
Here "stat data" means that this record contains file attributes that usually extracted by stat utility or ls -la.
First name stores the stat data (basic file system attributes) and has link number zero.
All the other records have keys constructed from their parent fid and child name ("f1", "f2"), and the record contains only file fid and link number that this record describes.
When the first file name is deleted, the stat data is migrated to another name record of the file (if any). This will be shown below.
The object index contains records:
(F, 0) -> (a.fid, "f0") (F, 1) -> (b.fid, "f1") (F, 2) -> (c.fid, "f2")
where the key is constructed of file fid and its link number. The record contains the parent fid plus the file name. That is, the object index enumerates all the names that a file has. As we have already noted, the object index table values have the same format as namespace keys and may be used for getting namespace data and cob object itself using object's fid.
When doing "rm a/f0" we need to kill 1 namespace and 1 object index record. That is, we need a key containing (a.fid, "f0"). Using this key we can find its position in namespace table and delete the record. But before killing it, we need to check if this record stores the stat data and whether we should move it to another hardlink filename. If ->m0_cob_nsrec::cnr_nlink > 0 this means that it is stat data record and there are other hardlinks for the file, so stat data should be moved. To find out where to move stat data quickly, we just do lookup in the object index for the next linkno of the file:
(F, 0 + 1) -> (b.fid, "f1")
Now we can use its record as a key for namespace table and move stat data to its record.
Now kill the record in the object index.
Stat data could be located in namespace table by using the very first record in object index table, which will be (F, 1) now. We still can initialize object index key with linkno=0 to find it and rely on database cursor which returns the first record in the table with the least linkno available.
We are done with unlink operation. Of course for cases when killing name that does not hold stat data, algorithm is much simpler. We just need to kill one record in name, find and update stat data record in namespace table (decremented nlink should be updated in the store), and kill one record in object index.
File attributes that are stored in separate tables may also be easily accessed using key constructed of F, where F is file fid.
Rationale:
Hard-links are rare, make common case fast by placing attributes in the file's directory entry, make readdir fast by moving other attributes out.
Corner cases:
Rename and unlink need to move file attributes from zero name.
Special case:
Using cob api for ioservice to create data objects is special case. The main difference is that, parent fid (in nskey) and child fid (in nsrec) are the same.
Cob iterator.
In order to iterate over all names that "dir" cob contains, cob iterator is used. It is simple cursor based API, that contains four methods:
‘cob’ and ‘name’ parameters, passed to m0_cob_iterator_init(), specify initial position of the iterator. Then iterator moves with m0_cob_iterator_next() method over namespace table until end of table is reached or a record with another parent fid is found.
Once iterator is not needed, it is finalized by m0_cob_iterator_fini().
- See also
- m0_mdstore_readdir() for example of using iterator.
Mkfs.
Cob cannot be used before m0_cob_domain_mkfs() is called. For details consult with m0_cob_domain_mkfs()
This function creates the following structures [records? objects?] in cob tables:
- the main root cob with fid M0_COB_ROOT_FID;
- metadata hierarchy root cob (what potentially metadata client can see) with fid M0_COB_ROOT_FID and name M0_COB_ROOT_NAME;
- omgid terminator record with id = ~0ULL. This is used for omgid allocation during m0_cob_create();
Mdstore based cobs cannot be used properly without mkfs done. All unit tests that access cob and also all modules using cobs should do m0_cob_domain_mkfs() on startup.
◆ M0_COB_ALL
Value:
Definition at line 352 of file cob.h.
◆ MKFS_ROOT_BLKSIZE
#define MKFS_ROOT_BLKSIZE 4096 |
◆ MKFS_ROOT_BLOCKS
#define MKFS_ROOT_BLOCKS 16 |
◆ MKFS_ROOT_SIZE
#define MKFS_ROOT_SIZE 4096 |
◆ anonymous enum
Enumerator |
---|
M0_COB_NAME_MAX | |
M0_COB_EA_MAX | |
Definition at line 67 of file cob.c.
◆ anonymous enum
Enumerator |
---|
M0_MDS_COB_ID_START | |
M0_IOS_COB_ID_START | |
Definition at line 228 of file cob.h.
◆ cob_table_kvtype
Enumerator |
---|
COB_KVTYPE_OMG | |
COB_KVTYPE_FAB | |
COB_KVTYPE_FEA | |
COB_KVTYPE_NS | |
COB_KVTYPE_OI | |
COB_KVTYPE_BC | |
Definition at line 2213 of file cob.c.
◆ cob_table_optype
Enumerator |
---|
COB_TABLE_DELETE | |
COB_TABLE_UPDATE | |
COB_TABLE_INSERT | |
Definition at line 2207 of file cob.c.
◆ m0_cob_domain_format_version
Enumerator |
---|
M0_COB_DOMAIN_FORMAT_VERSION_1 | |
M0_COB_DOMAIN_FORMAT_VERSION | Current version, should point to the latest version present
|
Definition at line 279 of file cob.h.
◆ m0_cob_flags
Cob flags and valid attributes.
Enumerator |
---|
M0_CA_NSKEY | nskey in cob is up-to-date
|
M0_CA_NSKEY_FREE | cob will dealloc the nskey
|
M0_CA_NSREC | nsrec in cob is up-to-date
|
M0_CA_FABREC | fabrec in cob is up-to-date
|
M0_CA_OMGREC | omgrec in cob is up-to-date
|
M0_CA_LAYOUT | layout in cob is up-to-date
|
M0_CA_BCREC | bytecount in cob is up-to-date
|
Definition at line 645 of file cob.h.
◆ m0_cob_nsrec_format_version
Enumerator |
---|
M0_COB_NSREC_FORMAT_VERSION_1 | |
M0_COB_NSREC_FORMAT_VERSION | Current version, should point to the latest version present
|
Definition at line 442 of file cob.h.
◆ m0_cob_op
Enumerator |
---|
M0_COB_OP_DOMAIN_MKFS | |
M0_COB_OP_LOOKUP | |
M0_COB_OP_LOCATE | |
M0_COB_OP_CREATE | |
M0_COB_OP_DELETE | |
M0_COB_OP_TRUNCATE | |
M0_COB_OP_DELETE_PUT | |
M0_COB_OP_UPDATE | |
M0_COB_OP_FEA_SET | |
M0_COB_OP_FEA_DEL | |
M0_COB_OP_NAME_ADD | |
M0_COB_OP_NAME_DEL | |
M0_COB_OP_NAME_UPDATE | |
M0_COB_OP_BYTECOUNT_SET | |
M0_COB_OP_BYTECOUNT_DEL | |
M0_COB_OP_BYTECOUNT_UPDATE | |
Definition at line 1068 of file cob.h.
◆ m0_cob_type
Enumerator |
---|
M0_COB_IO | |
M0_COB_MD | |
Definition at line 1124 of file cob.h.
◆ m0_cob_valid_flags
Flags for cob attributes.
Enumerator |
---|
M0_COB_ATIME | |
M0_COB_MTIME | |
M0_COB_CTIME | |
M0_COB_SIZE | |
M0_COB_MODE | |
M0_COB_UID | |
M0_COB_GID | |
M0_COB_BLOCKS | |
M0_COB_TYPE | |
M0_COB_FLAGS | |
M0_COB_NLINK | |
M0_COB_RDEV | |
M0_COB_BLKSIZE | |
M0_COB_LID | |
M0_COB_PVER | |
Definition at line 334 of file cob.h.
◆ bc_cmp()
static int bc_cmp |
( |
const void * |
key0, |
|
|
const void * |
key1 |
|
) |
| |
|
static |
Bytecount table comparator.
Definition at line 414 of file cob.c.
◆ bc_ksize()
◆ bc_vsize()
◆ cob0_fini()
static void cob0_fini |
( |
struct m0_be_domain * |
dom, |
|
|
const char * |
suffix, |
|
|
const struct m0_buf * |
data |
|
) |
| |
|
static |
◆ cob0_init()
static int cob0_init |
( |
struct m0_be_domain * |
dom, |
|
|
const char * |
suffix, |
|
|
const struct m0_buf * |
data |
|
) |
| |
|
static |
Definition at line 72 of file cob.c.
◆ cob_dom_id_make()
◆ cob_domain_id2str()
static void cob_domain_id2str |
( |
char ** |
s, |
|
|
const struct m0_cob_domain_id * |
cdid |
|
) |
| |
|
static |
◆ cob_fab_lookup()
static int cob_fab_lookup |
( |
struct m0_cob * |
cob | ) |
|
|
static |
◆ cob_fini()
static void cob_fini |
( |
struct m0_cob * |
cob | ) |
|
|
static |
◆ cob_free_cb()
static void cob_free_cb |
( |
struct m0_ref * |
ref | ) |
|
|
static |
Return cob memory to the pool
Definition at line 1081 of file cob.c.
◆ cob_get_fabomg()
static int cob_get_fabomg |
( |
struct m0_cob * |
cob, |
|
|
uint64_t |
flags |
|
) |
| |
|
static |
Load fab and omg records according with flags.
Definition at line 1350 of file cob.c.
◆ cob_ns_lookup()
static int cob_ns_lookup |
( |
struct m0_cob * |
cob | ) |
|
|
static |
Search for a record in the namespace table
If the lookup fails, we return error and co_flags accurately reflects the missing fields.
- See also
- cob_oi_lookup
Definition at line 1191 of file cob.c.
◆ cob_oi_lookup()
static int cob_oi_lookup |
( |
struct m0_cob * |
cob | ) |
|
|
static |
Search for a record in the object index table. Most likely we want stat data for a given fid, so let's do that as well.
- See also
- cob_ns_lookup
Definition at line 1219 of file cob.c.
◆ cob_omg_lookup()
static int cob_omg_lookup |
( |
struct m0_cob * |
cob | ) |
|
|
static |
◆ cob_table_delete()
◆ cob_table_insert()
◆ cob_table_lookup()
◆ cob_table_tx_credit()
◆ cob_table_update()
◆ ea_cmp()
static int ea_cmp |
( |
const void * |
key0, |
|
|
const void * |
key1 |
|
) |
| |
|
static |
Extended attributes table definition
Definition at line 646 of file cob.c.
◆ ea_ksize()
◆ ea_vsize()
◆ fb_cmp()
static int fb_cmp |
( |
const void * |
key0, |
|
|
const void * |
key1 |
|
) |
| |
|
static |
File attributes table definition
Definition at line 615 of file cob.c.
◆ fb_ksize()
◆ fb_vsize()
◆ m0_cob_alloc()
Allocate a new cob on passed .
Definition at line 1100 of file cob.c.
◆ m0_cob_alloc_omgid()
M0_INTERNAL int m0_cob_alloc_omgid |
( |
struct m0_cob_domain * |
dom, |
|
|
uint64_t * |
omgid |
|
) |
| |
Try to allocate new omgid using omg table and terminator record. Save allocated id in if not NULL.
Definition at line 1634 of file cob.c.
◆ m0_cob_bc_entries_dump()
M0_INTERNAL int m0_cob_bc_entries_dump |
( |
struct m0_cob_domain * |
cdom, |
|
|
struct m0_buf ** |
out_keys, |
|
|
struct m0_buf ** |
out_recs, |
|
|
uint32_t * |
out_count |
|
) |
| |
Returns all the entries in the bytecount btree in the form of Key and record buffers. This function uses bytecount iterator internally to traverse the btree.
Key buffer contains all the keys in a contigious sequence of memory pointed by out_keys::b_addr. An individual key can be accessed by traversing the memory in chunks of sizeof(struct m0_cob_bckey).
Similar logic applies to record buffer.
- Precondition
- out_keys == NULL
-
out_recs == NULL
- Parameters
-
cdom | cob domain where the bytecount btree resides. |
out_keys | out parameter buffer which gets populated by keys. |
out_recs | out parameter buffer which gets populated by records. |
out_count | out parameter with number of entries in the btree. |
- Return values
-
0 | Success. |
-errno | Other error. |
TODO: Iterate over the btree only once, store the key-vals in a list while iterating over the btree the 1st time.
Definition at line 496 of file cob.c.
◆ m0_cob_bc_insert()
Inserts a record in the bytecount table If the insert fails, we return error.
- Parameters
-
cob | cob btree to store byte count. |
bc_key | pool version fid and user_id. |
bc_rec | byte count for the given pool version. |
tx | be transaction handle. |
- Return values
-
0 | success |
-errno | other error. |
Definition at line 1140 of file cob.c.
◆ m0_cob_bc_iterator_fini()
Finish cob bc iterator.
Definition at line 489 of file cob.c.
◆ m0_cob_bc_iterator_get()
Retrieve the key values from the current position in table according with properties and stores it in the iterator structure.
- Return values
-
0 | Success. |
-ENOENT | Specified position not found in table. |
-errno | Other error. |
Definition at line 443 of file cob.c.
◆ m0_cob_bc_iterator_init()
Initialize iterator on the byte count btree with , as the start position.
- Parameters
-
cob | btree to iterate over. |
it | iterator. |
pver_fid | pool version fid, start position of the iterator. |
user_id | id of user, start position of the iterator. |
- Return values
-
-ENOMEM | out of memory. |
-errno | other error. |
Definition at line 420 of file cob.c.
◆ m0_cob_bc_iterator_next()
Position to next key in a bc table.
- Return values
-
0 | Success. |
-ENOENT | No more keys in byte count table. |
-errno | Other error. |
Definition at line 467 of file cob.c.
◆ m0_cob_bc_lookup()
Search for a record in the bytecount table and fills struct m0_cob_bcrec if key is found. If the lookup fails, we return error and co_flags accurately reflects the missing fields.
- Parameters
-
cob | cob btree to store byte count. |
bc_key | pool version fid and user_id. |
bc_rec | out paramter, byte count for the given pool version. |
- Return values
-
0 | success |
-ENOENT | record not found. |
-errno | other error. |
Definition at line 1120 of file cob.c.
◆ m0_cob_bc_update()
Updates a record in the bytecount table If the update fails, it returns error.
- Parameters
-
cob | cob btree to store byte count. |
bc_key | pool version fid and user_id. |
bc_rec | byte count for the given pool version. |
tx | be transaction handle. |
- Return values
-
0 | success |
-errno | other error. |
Definition at line 1161 of file cob.c.
◆ m0_cob_bckey_cmp()
◆ m0_cob_bckey_make()
static int m0_cob_bckey_make |
( |
struct m0_cob_bckey ** |
keyh, |
|
|
const struct m0_fid * |
pver_fid, |
|
|
uint64_t |
user_id |
|
) |
| |
|
static |
Make bytecount key for iterator. Allocate space for key.
Definition at line 384 of file cob.c.
◆ m0_cob_bckey_size()
static size_t m0_cob_bckey_size |
( |
void |
| ) |
|
|
static |
◆ m0_cob_bcrec_size()
static size_t m0_cob_bcrec_size |
( |
void |
| ) |
|
|
static |
◆ m0_cob_create()
Add a cob to the namespace.
This doesn't create a new storage object; just creates metadata table entries for it to enable namespace and oi lookup.
- Parameters
-
cob | cob instance allocated with m0_cob_alloc() |
nskey | namespace key made with m0_cob_nskey_make() |
nsrec | namespace record with all attributes set |
fabrec | basic attributes record |
omgrec | owner/mode/group record |
tx | transaction handle |
Definition at line 1681 of file cob.c.
◆ m0_cob_delete()
M0_INTERNAL int m0_cob_delete |
( |
struct m0_cob * |
cob, |
|
|
struct m0_be_tx * |
tx |
|
) |
| |
Delete name with stat data, entry in object index and all file attributes from fab, omg, etc., tables.
- Parameters
-
cob | this cob will be deleted |
tx | db transaction to use |
Note, that m0_cob_delete() does not decrement cob's reference counter. Use m0_cob_delete_put() to have the counter decremented.
- See also
- m0_cob_delete_put()
Definition at line 1789 of file cob.c.
◆ m0_cob_delete_put()
M0_INTERNAL int m0_cob_delete_put |
( |
struct m0_cob * |
cob, |
|
|
struct m0_be_tx * |
tx |
|
) |
| |
◆ m0_cob_domain_create()
Creates and initialises COB domain.
Definition at line 840 of file cob.c.
◆ m0_cob_domain_create_prepared()
◆ m0_cob_domain_credit_add()
◆ m0_cob_domain_destroy()
Finalises and destroys COB domain. The dom's memory is released here and must not be accessed after this.
Definition at line 871 of file cob.c.
◆ m0_cob_domain_fini()
◆ m0_cob_domain_init()
Set up a new cob domain
Tables are identified by the domain id, which must be set before calling this function.
Definition at line 708 of file cob.c.
◆ m0_cob_domain_mkfs()
Create initial files system structures, such as: entire storage root, root cob for sessions and root cob for hierarchy. Latter is only one of them visible to user on client.
Prepare storage before using. Create root cob for session objects and root for files hierarchy.
Create terminator omgid record with id == ~0ULL.
Create root cob where all namespace is stored.
Definition at line 980 of file cob.c.
◆ m0_cob_ea_del()
Del a record in the extended attributes table
Definition at line 2193 of file cob.c.
◆ m0_cob_ea_del_credit()
XXX not yet implemented
Definition at line 2372 of file cob.c.
◆ m0_cob_ea_get()
Search for a record to the extended attributes table
Definition at line 2155 of file cob.c.
◆ m0_cob_ea_get_credit()
XXX not yet implemented
Definition at line 2356 of file cob.c.
◆ m0_cob_ea_iterator_fini()
Finish cob ea iterator.
Definition at line 1620 of file cob.c.
◆ m0_cob_ea_iterator_get()
Position in table according with properties.
- Return values
-
0 | Success. |
-ENOENT | Specified position not found in table. |
-errno | Other error. |
Check if we are stil inside the object bounds. Assert and key copy can be done only in this case.
Definition at line 1565 of file cob.c.
◆ m0_cob_ea_iterator_init()
◆ m0_cob_ea_iterator_init_credit()
XXX not yet implemented
Definition at line 2379 of file cob.c.
◆ m0_cob_ea_iterator_next()
Position to next name in a ea table.
- Return values
-
0 | Success. |
-ENOENT | Next name is not found in ea table. |
-errno | Other error. |
Check if we are stil inside the object bounds. Assert and key copy can be done only in this case.
Definition at line 1593 of file cob.c.
◆ m0_cob_ea_set()
Add a record to the extended attributes table. If key already exists then kill the old record.
Definition at line 2171 of file cob.c.
◆ m0_cob_ea_set_credit()
XXX not yet implemented
Definition at line 2364 of file cob.c.
◆ m0_cob_eakey_cmp()
◆ m0_cob_eakey_make()
M0_INTERNAL int m0_cob_eakey_make |
( |
struct m0_cob_eakey ** |
keyh, |
|
|
const struct m0_fid * |
fid, |
|
|
const char * |
name, |
|
|
size_t |
namelen |
|
) |
| |
Create ea table key from passed file fid and ea name.
Definition at line 181 of file cob.c.
◆ m0_cob_eakey_size()
M0_INTERNAL size_t m0_cob_eakey_size |
( |
const struct m0_cob_eakey * |
cek | ) |
|
◆ m0_cob_earec_size()
static size_t m0_cob_earec_size |
( |
const struct m0_cob_earec * |
rec | ) |
|
|
static |
◆ m0_cob_fabrec_make()
M0_INTERNAL int m0_cob_fabrec_make |
( |
struct m0_cob_fabrec ** |
rech, |
|
|
const char * |
link, |
|
|
size_t |
linklen |
|
) |
| |
◆ m0_cob_fabrec_size()
static size_t m0_cob_fabrec_size |
( |
const struct m0_cob_fabrec * |
rec | ) |
|
|
static |
Fabrec size taking into account symlink length.
Definition at line 257 of file cob.c.
◆ m0_cob_fid()
M0_INTERNAL const struct m0_fid * m0_cob_fid |
( |
const struct m0_cob * |
cob | ) |
|
◆ m0_cob_get()
M0_INTERNAL void m0_cob_get |
( |
struct m0_cob * |
obj | ) |
|
Acquires an additional reference on the object.
- See also
- m0_cob_put()
Definition at line 1090 of file cob.c.
◆ m0_cob_init()
Initialises cob instance with cob domain.
- Parameters
-
dom | ios/mds cob domain. |
cob | cob instance. |
- Todo:
- Get di type from configuration.
Definition at line 1057 of file cob.c.
◆ m0_cob_is_valid()
static bool m0_cob_is_valid |
( |
struct m0_cob * |
cob | ) |
|
|
static |
For assertions only.
Definition at line 1629 of file cob.c.
◆ m0_cob_iterator_fini()
Finish cob iterator.
Definition at line 1477 of file cob.c.
◆ m0_cob_iterator_get()
Position in table according with properties.
- Return values
-
0 | Success. |
-ENOENT | Specified position not found in table. |
-errno | Other error. |
Check if we are stil inside the object bounds. Assert and key copy can be done only in this case.
Definition at line 1483 of file cob.c.
◆ m0_cob_iterator_init()
◆ m0_cob_iterator_next()
Position to next name in a dir cob.
- Return values
-
0 | Success. |
-ENOENT | Next name not found in directory. |
-errno | Other error. |
Check if we are stil inside the object bounds. Assert and key copy can be done only in this case.
Definition at line 1512 of file cob.c.
◆ m0_cob_locate()
Locate cob by object index key.
Create a new cob and populate it with the contents of the a record; i.e. the filename. This also lookups for all attributes, that is, fab, omg, etc., according to flags.
- Parameters
-
dom | cob domain to use |
oikey | oikey (fid) to lookup |
flags | flags specifying what parts of cob to populate |
out | resulting cob is store here |
tx | db transaction to be used |
- See also
- m0_cob_lookup
Definition at line 1407 of file cob.c.
◆ m0_cob_lookup()
Lookup a filename in the namespace table.
Allocate a new cob and populate it with the contents of the namespace record; i.e. the stat data and fid. This function also looks up fab and omg tables, depending on "need" flag.
- Parameters
-
dom | cob domain to use |
nskey | name to lookup |
flags | flags specifying what parts of cob to populate |
out | resulting cob is store here |
tx | db transaction to be used |
- See also
- m0_cob_locate
Definition at line 1371 of file cob.c.
◆ m0_cob_max_eakey_make()
static int m0_cob_max_eakey_make |
( |
struct m0_cob_eakey ** |
keyh, |
|
|
const struct m0_fid * |
fid, |
|
|
const char * |
name, |
|
|
int |
namelen |
|
) |
| |
|
static |
Make eakey for iterator. Allocate space for maximal possible name.
Definition at line 199 of file cob.c.
◆ m0_cob_max_eakey_size()
static size_t m0_cob_max_eakey_size |
( |
void |
| ) |
|
|
static |
Maximal possible eakey size.
Definition at line 249 of file cob.c.
◆ m0_cob_max_earec_size()
M0_INTERNAL size_t m0_cob_max_earec_size |
( |
void |
| ) |
|
Maximal possible earec size.
Max possible size of earec.
Definition at line 241 of file cob.c.
◆ m0_cob_max_fabrec_make()
static int m0_cob_max_fabrec_make |
( |
struct m0_cob_fabrec ** |
rech | ) |
|
|
static |
Allocate memory for maximal possible size of fabrec.
Definition at line 288 of file cob.c.
◆ m0_cob_max_fabrec_size()
static size_t m0_cob_max_fabrec_size |
( |
void |
| ) |
|
|
static |
Maximal possible fabrec size.
Definition at line 280 of file cob.c.
◆ m0_cob_max_nskey_make()
static int m0_cob_max_nskey_make |
( |
struct m0_cob_nskey ** |
keyh, |
|
|
const struct m0_fid * |
pfid, |
|
|
const char * |
name, |
|
|
int |
namelen |
|
) |
| |
|
static |
Make nskey for iterator. Allocate space for maximal possible name.
Definition at line 303 of file cob.c.
◆ m0_cob_max_nskey_size()
static size_t m0_cob_max_nskey_size |
( |
void |
| ) |
|
|
static |
Key size for iterator in which case we don't know exact length of key and want to allocate it for worst case scenario, that is, for max possible name len.
Definition at line 324 of file cob.c.
◆ m0_cob_mod_fini()
M0_INTERNAL void m0_cob_mod_fini |
( |
void |
| ) |
|
Module finalizer.
Definition at line 135 of file cob.c.
◆ m0_cob_mod_init()
M0_INTERNAL int m0_cob_mod_init |
( |
void |
| ) |
|
Module initializer.
Definition at line 129 of file cob.c.
◆ m0_cob_name_add()
Add name to namespace and object index.
- Parameters
-
cob | stat data (zero name) cob; |
nskey | new name to add to the file; |
nsrec | nsrec that will be added; |
tx | transaction handle. |
Definition at line 1924 of file cob.c.
◆ m0_cob_name_del()
Delete name from namespace and object index.
- Parameters
-
cob | stat data (zero name) cob; |
nskey | name to kill (may be the name of statdata); |
tx | transaction handle. |
Definition at line 1966 of file cob.c.
◆ m0_cob_name_update()
Rename old record with new record.
- Parameters
-
cob | stat data (zero name) cob; |
srckey | source name; |
tgtkey | target name; |
tx | transaction handle |
Definition at line 2004 of file cob.c.
◆ m0_cob_nskey_cmp()
Compare two keys. Return: k0 > k1: +1, k0 < k1: -1, 0 - otherwise.
Definition at line 163 of file cob.c.
◆ m0_cob_nskey_make()
M0_INTERNAL int m0_cob_nskey_make |
( |
struct m0_cob_nskey ** |
keyh, |
|
|
const struct m0_fid * |
pfid, |
|
|
const char * |
name, |
|
|
size_t |
namelen |
|
) |
| |
Create namespace table key for ns table manipulation. It contains parent fid and child name.
Definition at line 148 of file cob.c.
◆ m0_cob_nskey_size()
M0_INTERNAL size_t m0_cob_nskey_size |
( |
const struct m0_cob_nskey * |
cnk | ) |
|
◆ m0_cob_nsrec_init()
M0_INTERNAL void m0_cob_nsrec_init |
( |
struct m0_cob_nsrec * |
nsrec | ) |
|
◆ m0_cob_oikey_make()
M0_INTERNAL void m0_cob_oikey_make |
( |
struct m0_cob_oikey * |
oikey, |
|
|
const struct m0_fid * |
fid, |
|
|
int |
linkno |
|
) |
| |
Create object index key that is used for operations on object index table. It consists of object fid an linkno depending on what record we want to find.
Definition at line 141 of file cob.c.
◆ m0_cob_put()
M0_INTERNAL void m0_cob_put |
( |
struct m0_cob * |
obj | ) |
|
Releases a reference on the object.
When the last reference is released, the object can either return to the cache or can be immediately destroyed.
- See also
- m0_cob_get(), m0_cob_delete_put()
Definition at line 1095 of file cob.c.
◆ m0_cob_setattr()
Sets cob attributes to those present in attr.
- Parameters
-
cob | cob for which attributes will be changed |
attr | attributes to be loaded into a cob |
tx | be transaction to be used |
Definition at line 2068 of file cob.c.
◆ m0_cob_size_update()
M0_INTERNAL int m0_cob_size_update |
( |
struct m0_cob * |
cob, |
|
|
uint64_t |
size, |
|
|
struct m0_be_tx * |
tx |
|
) |
| |
◆ m0_cob_tx_credit()
◆ m0_cob_update()
Update file attributes of passed cob with , and fields.
- Parameters
-
cob | cob store updates to |
nsrec | new nsrec to store to cob |
fabrec | fab record to store or null |
omgrec | omg record to store or null |
tx | db transaction to be used |
Definition at line 1860 of file cob.c.
◆ M0_XCA_DOMAIN()
◆ ns_cmp()
static int ns_cmp |
( |
const void * |
key0, |
|
|
const void * |
key1 |
|
) |
| |
|
static |
Namespace table definition.
Definition at line 332 of file cob.c.
◆ ns_ksize()
◆ ns_vsize()
◆ oi_cmp()
static int oi_cmp |
( |
const void * |
key0, |
|
|
const void * |
key1 |
|
) |
| |
|
static |
Object index table definition.
Definition at line 587 of file cob.c.
◆ oi_ksize()
◆ omg_cmp()
static int omg_cmp |
( |
const void * |
key0, |
|
|
const void * |
key1 |
|
) |
| |
|
static |
Omg table definition.
Definition at line 671 of file cob.c.
◆ omg_ksize()
◆ omg_vsize()
◆ ca_atime
time of last access.
Definition at line 371 of file cob.h.
◆ ca_blksize
blocksize for filesystem I/O.
Definition at line 377 of file cob.h.
◆ ca_blocks
number of blocks allocated.
Definition at line 378 of file cob.h.
◆ ca_ctime
time of last status change.
Definition at line 373 of file cob.h.
◆ ca_eakey
xattr name
Definition at line 383 of file cob.h.
◆ ca_eaval
xattr value
Definition at line 384 of file cob.h.
◆ ca_gid
group ID of owner.
Definition at line 370 of file cob.h.
◆ ca_lid
layout id
Definition at line 380 of file cob.h.
◆ ca_link
symlink body
Definition at line 382 of file cob.h.
◆ ca_mode
protection.
Definition at line 368 of file cob.h.
◆ ca_mtime
time of last modification.
Definition at line 372 of file cob.h.
◆ ca_name
object name
Definition at line 381 of file cob.h.
◆ ca_nlink
number of hard links.
Definition at line 375 of file cob.h.
◆ ca_pfid
parent fid
Definition at line 364 of file cob.h.
◆ ca_pver
cob pool version
Definition at line 366 of file cob.h.
◆ ca_rdev
devid for special devices
Definition at line 374 of file cob.h.
◆ ca_size
total size, in bytes.
Definition at line 376 of file cob.h.
◆ ca_tfid
object fid
Definition at line 365 of file cob.h.
◆ ca_uid
user ID of owner.
Definition at line 369 of file cob.h.
◆ ca_valid
valid bits (enum m0_cob_valid_flags)
Definition at line 367 of file cob.h.
◆ ca_version
object version
Definition at line 379 of file cob.h.
◆ cbk_pfid [1/2]
Pool ver fid
Definition at line 516 of file cob.h.
◆ cbk_pfid [2/2]
Pool ver fid
Definition at line 454 of file cob.h.
◆ cbk_user_id [1/2]
User id
Definition at line 455 of file cob.h.
◆ cbk_user_id [2/2]
User id
Definition at line 517 of file cob.h.
◆ cbr_bytecount [1/2]
Byte count
Definition at line 454 of file cob.h.
◆ cbr_bytecount [2/2]
Byte count
Definition at line 522 of file cob.h.
◆ cbr_cob_objects [1/2]
Cob object count
Definition at line 455 of file cob.h.
◆ cbr_cob_objects [2/2]
Cob object count
Definition at line 523 of file cob.h.
◆ cd_bytecount [1/2]
◆ cd_bytecount [2/2]
◆ cd_fileattr_basic [1/2]
◆ cd_fileattr_basic [2/2]
◆ cd_fileattr_ea [1/2]
◆ cd_fileattr_ea [2/2]
◆ cd_fileattr_omg [1/2]
◆ cd_fileattr_omg [2/2]
◆ cd_footer [1/2]
◆ cd_footer [2/2]
◆ cd_header [1/2]
◆ cd_header [2/2]
◆ cd_id [1/2]
◆ cd_id [2/2]
◆ cd_lock [1/2]
◆ cd_lock [2/2]
◆ cd_namespace [1/2]
◆ cd_namespace [2/2]
◆ cd_object_index [1/2]
◆ cd_object_index [2/2]
◆ cek_fid [1/2]
EA owner fid
Definition at line 504 of file cob.h.
◆ cek_fid [2/2]
EA owner fid
Definition at line 454 of file cob.h.
◆ cek_name [1/2]
EA name
Definition at line 505 of file cob.h.
◆ cek_name [2/2]
EA name
Definition at line 455 of file cob.h.
◆ cer_body [1/2]
EA body
Definition at line 455 of file cob.h.
◆ cer_body [2/2]
EA body
Definition at line 511 of file cob.h.
◆ cer_size [1/2]
EA len
Definition at line 454 of file cob.h.
◆ cer_size [2/2]
EA len
Definition at line 510 of file cob.h.
◆ cfb_fid [1/2]
◆ cfb_fid [2/2]
◆ cfb_layoutid [1/2]
reference to layout
Definition at line 456 of file cob.h.
◆ cfb_layoutid [2/2]
reference to layout
Definition at line 480 of file cob.h.
◆ cfb_link [1/2]
symlink body
Definition at line 458 of file cob.h.
◆ cfb_link [2/2]
symlink body
Definition at line 482 of file cob.h.
◆ cfb_linklen [1/2]
symlink len if any
Definition at line 457 of file cob.h.
◆ cfb_linklen [2/2]
symlink len if any
Definition at line 481 of file cob.h.
◆ cfb_pver [1/2]
pool version fid
Definition at line 478 of file cob.h.
◆ cfb_pver [2/2]
pool version fid
Definition at line 454 of file cob.h.
◆ cfb_version [1/2]
version from last fop
Definition at line 455 of file cob.h.
◆ cfb_version [2/2]
version from last fop
Definition at line 479 of file cob.h.
◆ ci_cob [1/3]
the cob we iterate
Definition at line 617 of file cob.h.
◆ ci_cob [2/3]
the cob we iterate
Definition at line 626 of file cob.h.
◆ ci_cob [3/3]
the cob we iterate
Definition at line 636 of file cob.h.
◆ ci_cursor [1/3]
cob iterator cursor
Definition at line 618 of file cob.h.
◆ ci_cursor [2/3]
cob iterator cursor
Definition at line 627 of file cob.h.
◆ ci_cursor [3/3]
cob iterator cursor
Definition at line 637 of file cob.h.
◆ ci_key [1/3]
current iterator pos
Definition at line 619 of file cob.h.
◆ ci_key [2/3]
current iterator pos
Definition at line 628 of file cob.h.
◆ ci_key [3/3]
current iterator pos
Definition at line 638 of file cob.h.
◆ ci_rec [1/2]
current iterator rec
Definition at line 629 of file cob.h.
◆ ci_rec [2/2]
current iterator rec
Definition at line 639 of file cob.h.
◆ cnk_name [1/2]
◆ cnk_name [2/2]
◆ cnk_pfid [1/2]
◆ cnk_pfid [2/2]
◆ cnr_atime [1/2]
time of last access
Definition at line 426 of file cob.h.
◆ cnr_atime [2/2]
time of last access
Definition at line 434 of file cob.h.
◆ cnr_blksize [1/2]
blocksize for filesystem I/O
Definition at line 424 of file cob.h.
◆ cnr_blksize [2/2]
blocksize for filesystem I/O
Definition at line 432 of file cob.h.
◆ cnr_blocks [1/2]
number of blocks allocated
Definition at line 425 of file cob.h.
◆ cnr_blocks [2/2]
number of blocks allocated
Definition at line 433 of file cob.h.
◆ cnr_bytecount [1/2]
bytecount in this cob
Definition at line 423 of file cob.h.
◆ cnr_bytecount [2/2]
bytecount in this cob
Definition at line 431 of file cob.h.
◆ cnr_cntr [1/2]
linkno allocation counter
Definition at line 419 of file cob.h.
◆ cnr_cntr [2/2]
linkno allocation counter
Definition at line 427 of file cob.h.
◆ cnr_ctime [1/2]
time of last status change
Definition at line 428 of file cob.h.
◆ cnr_ctime [2/2]
time of last status change
Definition at line 436 of file cob.h.
◆ cnr_fid [1/2]
object fid
Definition at line 419 of file cob.h.
◆ cnr_fid [2/2]
object fid
Definition at line 411 of file cob.h.
◆ cnr_footer [1/2]
◆ cnr_footer [2/2]
◆ cnr_header [1/2]
◆ cnr_header [2/2]
◆ cnr_lid [1/2]
layout id
Definition at line 429 of file cob.h.
◆ cnr_lid [2/2]
layout id
Definition at line 437 of file cob.h.
◆ cnr_linkno [1/2]
number of link for the name
Definition at line 412 of file cob.h.
◆ cnr_linkno [2/2]
number of link for the name
Definition at line 420 of file cob.h.
◆ cnr_mtime [1/2]
time of last modification
Definition at line 427 of file cob.h.
◆ cnr_mtime [2/2]
time of last modification
Definition at line 435 of file cob.h.
◆ cnr_nlink [1/2]
The following fields are only important for 0-nsrec, that is, stat data. For other records, only two fields above are valid.number of hard links
Definition at line 418 of file cob.h.
◆ cnr_nlink [2/2]
The following fields are only important for 0-nsrec, that is, stat data. For other records, only two fields above are valid.number of hard links
Definition at line 426 of file cob.h.
◆ cnr_omgid [1/2]
uid/gid/mode slot reference
Definition at line 421 of file cob.h.
◆ cnr_omgid [2/2]
uid/gid/mode slot reference
Definition at line 429 of file cob.h.
◆ cnr_pad [1/2]
◆ cnr_pad [2/2]
◆ cnr_pver [1/2]
cob pool version
Definition at line 430 of file cob.h.
◆ cnr_pver [2/2]
cob pool version
Definition at line 438 of file cob.h.
◆ cnr_size [1/2]
total size, in bytes
Definition at line 422 of file cob.h.
◆ cnr_size [2/2]
total size, in bytes
Definition at line 430 of file cob.h.
◆ co_dom
◆ co_fabrec
fileattr_basic data (acl...)
Definition at line 591 of file cob.h.
◆ co_file
File containig fid which is reference to the nsrec fid
Definition at line 586 of file cob.h.
◆ co_flags
◆ co_nskey
cob statdata nskey
Definition at line 588 of file cob.h.
◆ co_nsrec
object fid, basic stat data
Definition at line 590 of file cob.h.
◆ co_oikey
object fid, linkno
Definition at line 589 of file cob.h.
◆ co_omgrec
permission data
Definition at line 592 of file cob.h.
◆ co_ref
refcounter for caching cobs
Definition at line 584 of file cob.h.
◆ co_stob
underlying storage object
Definition at line 583 of file cob.h.
◆ cob_bc_ops
Initial value:= {
}
static m0_bcount_t bc_ksize(const void *key)
static m0_bcount_t bc_vsize(const void *val)
static int bc_cmp(const void *key0, const void *key1)
Definition at line 577 of file cob.c.
◆ cob_ea_ops
Initial value:= {
}
static int ea_cmp(const void *key0, const void *key1)
static m0_bcount_t ea_vsize(const void *val)
static m0_bcount_t ea_ksize(const void *key)
Definition at line 661 of file cob.c.
◆ cob_fab_ops
Initial value:= {
}
static m0_bcount_t fb_ksize(const void *key)
static m0_bcount_t fb_vsize(const void *val)
static int fb_cmp(const void *key0, const void *key1)
Definition at line 636 of file cob.c.
◆ cob_ns_ops
Initial value:= {
}
static m0_bcount_t ns_vsize(const void *val)
static m0_bcount_t ns_ksize(const void *key)
static int ns_cmp(const void *key0, const void *key1)
Definition at line 348 of file cob.c.
◆ cob_oi_ops
Initial value:= {
}
static m0_bcount_t oi_ksize(const void *key)
static int oi_cmp(const void *key0, const void *key1)
static m0_bcount_t ns_ksize(const void *key)
Definition at line 605 of file cob.c.
◆ cob_omg_ops
Initial value:= {
}
static m0_bcount_t omg_vsize(const void *val)
static int omg_cmp(const void *key0, const void *key1)
static m0_bcount_t omg_ksize(const void *key)
Definition at line 688 of file cob.c.
◆ cok_fid [1/2]
◆ cok_fid [2/2]
◆ cok_linkno [1/2]
hardlink ordinal index
Definition at line 455 of file cob.h.
◆ cok_linkno [2/2]
hardlink ordinal index
Definition at line 458 of file cob.h.
◆ cok_omgid [1/2]
omg id ref
Definition at line 454 of file cob.h.
◆ cok_omgid [2/2]
omg id ref
Definition at line 490 of file cob.h.
◆ cor_gid [1/2]
group ID of owner
Definition at line 456 of file cob.h.
◆ cor_gid [2/2]
group ID of owner
Definition at line 499 of file cob.h.
◆ cor_mode [1/2]
protection
Definition at line 455 of file cob.h.
◆ cor_mode [2/2]
protection
Definition at line 498 of file cob.h.
◆ cor_uid [1/2]
user ID of owner
Definition at line 454 of file cob.h.
◆ cor_uid [2/2]
user ID of owner
Definition at line 497 of file cob.h.
◆ d_name
◆ d_namelen
◆ d_reclen
◆ id [1/2]
◆ id [2/2]
◆ m0_be_cob0
Initial value:= {
.b0_name = "M0_BE:COB",
}
static int cob0_init(struct m0_be_domain *dom, const char *suffix, const struct m0_buf *data)
static void cob0_fini(struct m0_be_domain *dom, const char *suffix, const struct m0_buf *data)
Definition at line 111 of file cob.c.
◆ m0_cob_fid_type [1/2]
Initial value:= {
.ft_id = 'C',
.ft_name = "cob fid"
}
Definition at line 117 of file cob.c.
◆ m0_cob_fid_type [2/2]
◆ M0_XCA_DOMAIN
◆ M0_XCA_ENUM
◆ r_buf
◆ r_end
◆ r_pos