Motr  M0
Fidconvert

Enumerations

enum  {
  M0_FID_DEVICE_ID_BITS = 24, M0_FID_DEVICE_ID_OFFSET = 32, M0_FID_DEVICE_ID_MASK, M0_FID_DEVICE_ID_MAX = (1ULL << M0_FID_DEVICE_ID_BITS) - 1,
  M0_FID_GOB_CONTAINER_MASK = (1ULL << M0_FID_DEVICE_ID_OFFSET) - 1, M0_AD_STOB_LINUX_DOM_KEY = 0xadf11e, M0_SDEV_CID_DEFAULT = 1
}
 

Functions

M0_INTERNAL uint32_t m0_fid__device_id_extract (const struct m0_fid *fid)
 
M0_INTERNAL void m0_fid_gob_make (struct m0_fid *gob_fid, uint32_t container, uint64_t key)
 
M0_INTERNAL void m0_fid_convert_gob2cob (const struct m0_fid *gob_fid, struct m0_fid *cob_fid, uint32_t device_id)
 
M0_INTERNAL void m0_fid_convert_cob2gob (const struct m0_fid *cob_fid, struct m0_fid *gob_fid)
 
M0_INTERNAL uint32_t m0_fid_cob_device_id (const struct m0_fid *cob_fid)
 
M0_INTERNAL uint64_t m0_fid_conf_sdev_device_id (const struct m0_fid *sdev_fid)
 
M0_INTERNAL bool m0_fid_validate_gob (const struct m0_fid *gob_fid)
 
M0_INTERNAL bool m0_fid_validate_cob (const struct m0_fid *cob_fid)
 
M0_INTERNAL void m0_fid_convert_cob2stob (const struct m0_fid *cob_fid, struct m0_stob_id *stob_id)
 
M0_INTERNAL void m0_fid_convert_cob2adstob (const struct m0_fid *cob_fid, struct m0_stob_id *stob_id)
 
M0_INTERNAL void m0_fid_convert_adstob2cob (const struct m0_stob_id *stob_id, struct m0_fid *cob_fid)
 
M0_INTERNAL void m0_fid_convert_stob2cob (const struct m0_stob_id *stob_id, struct m0_fid *cob_fid)
 
M0_INTERNAL void m0_fid_convert_bstore2adstob (const struct m0_fid *bstore_fid, struct m0_fid *stob_domain_fid)
 
M0_INTERNAL void m0_fid_convert_adstob2bstore (const struct m0_fid *stob_domain_fid, struct m0_fid *bstore_fid)
 
M0_INTERNAL bool m0_fid_validate_adstob (const struct m0_stob_id *stob_id)
 
M0_INTERNAL bool m0_fid_validate_bstore (const struct m0_fid *bstore_fid)
 
M0_INTERNAL bool m0_fid_validate_linuxstob (const struct m0_stob_id *stob_id)
 
M0_INTERNAL void m0_fid_convert_cob2linuxstob (const struct m0_fid *cob_fid, struct m0_stob_id *stob_id)
 
M0_INTERNAL void m0_fid_convert_linuxstob2cob (const struct m0_stob_id *stob_id, struct m0_fid *cob_fid)
 

Detailed Description

*                     8 bits           24 bits             96 bits
*                 +-----------------+-----------+---------------------------+
*    GOB fid      |   GOB type id   |  zeroed   |                           |
*                 +-----------------+-----------+---------------------------+
*                                                            ||
*                                                            \/
*                 +-----------------+-----------+---------------------------+
*    COB fid      |   COB type id   | device id |                           |
*                 +-----------------+-----------+---------------------------+
*                                        ||                  ||
*                                        \/                  \/
*    AD stob      +-----------------+-----------+---------------------------+
*      fid        | AD stob type id | device id |                           |
*                 +-----------------+-----------+---------------------------+
*
*                       8 bits                96 bits             24 bits
*                 +-----------------+---------------------------+-----------+
*     AD stob     | AD stob domain  |          zeroed           | device id |
*   domain fid    |    type id      |                           |           |
*                 +-----------------+---------------------------------------+
*                                                      ||
*                                                      \/
*  AD stob domain +-----------------+---------------------------------------+
*  backing store  |   linux stob    |                                       |
*    stob fid     |     type id     |                                       |
*                 +-----------------+---------------------------------------+
*                       8 bits                     120 bits
*                 +-----------------+---------------------------------------+
*     Linux stob  | Linux stob dom  |                                       |
*   domain fid    |    type id      |        FIXED DOM KEY                  |
*                 +-----------------+---------------------------------------+
* 

Note: ad stob backing store conversion is here because ad stob itself doesn't have limitation on backing store stob fid, but ioservice has such limitation.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
M0_FID_DEVICE_ID_BITS 
M0_FID_DEVICE_ID_OFFSET 
M0_FID_DEVICE_ID_MASK 
M0_FID_DEVICE_ID_MAX 
M0_FID_GOB_CONTAINER_MASK 
M0_AD_STOB_LINUX_DOM_KEY 
M0_SDEV_CID_DEFAULT 

Default cid for fake linuxstob storage.

Definition at line 76 of file fid_convert.h.

Function Documentation

◆ m0_fid__device_id_extract()

M0_INTERNAL uint32_t m0_fid__device_id_extract ( const struct m0_fid fid)

Definition at line 40 of file fid_convert.c.

Here is the caller graph for this function:

◆ m0_fid_cob_device_id()

M0_INTERNAL uint32_t m0_fid_cob_device_id ( const struct m0_fid cob_fid)

Definition at line 81 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_conf_sdev_device_id()

M0_INTERNAL uint64_t m0_fid_conf_sdev_device_id ( const struct m0_fid sdev_fid)

Definition at line 88 of file fid_convert.c.

◆ m0_fid_convert_adstob2bstore()

M0_INTERNAL void m0_fid_convert_adstob2bstore ( const struct m0_fid stob_domain_fid,
struct m0_fid bstore_fid 
)

Definition at line 76 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_convert_adstob2cob()

M0_INTERNAL void m0_fid_convert_adstob2cob ( const struct m0_stob_id stob_id,
struct m0_fid cob_fid 
)

Definition at line 54 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_convert_bstore2adstob()

M0_INTERNAL void m0_fid_convert_bstore2adstob ( const struct m0_fid bstore_fid,
struct m0_fid stob_domain_fid 
)

Definition at line 66 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_convert_cob2adstob()

M0_INTERNAL void m0_fid_convert_cob2adstob ( const struct m0_fid cob_fid,
struct m0_stob_id stob_id 
)

Definition at line 38 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_convert_cob2gob()

M0_INTERNAL void m0_fid_convert_cob2gob ( const struct m0_fid cob_fid,
struct m0_fid gob_fid 
)

Definition at line 69 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_convert_cob2linuxstob()

M0_INTERNAL void m0_fid_convert_cob2linuxstob ( const struct m0_fid cob_fid,
struct m0_stob_id stob_id 
)

Definition at line 113 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_convert_cob2stob()

M0_INTERNAL void m0_fid_convert_cob2stob ( const struct m0_fid cob_fid,
struct m0_stob_id stob_id 
)

Definition at line 141 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_convert_gob2cob()

M0_INTERNAL void m0_fid_convert_gob2cob ( const struct m0_fid gob_fid,
struct m0_fid cob_fid,
uint32_t  device_id 
)

Definition at line 55 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_convert_linuxstob2cob()

M0_INTERNAL void m0_fid_convert_linuxstob2cob ( const struct m0_stob_id stob_id,
struct m0_fid cob_fid 
)

Definition at line 130 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_convert_stob2cob()

M0_INTERNAL void m0_fid_convert_stob2cob ( const struct m0_stob_id stob_id,
struct m0_fid cob_fid 
)

Definition at line 152 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_gob_make()

M0_INTERNAL void m0_fid_gob_make ( struct m0_fid gob_fid,
uint32_t  container,
uint64_t  key 
)

Definition at line 46 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_validate_adstob()

M0_INTERNAL bool m0_fid_validate_adstob ( const struct m0_stob_id stob_id)

Definition at line 87 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_validate_bstore()

M0_INTERNAL bool m0_fid_validate_bstore ( const struct m0_fid bstore_fid)

Definition at line 98 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_validate_cob()

M0_INTERNAL bool m0_fid_validate_cob ( const struct m0_fid cob_fid)

Definition at line 99 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_validate_gob()

M0_INTERNAL bool m0_fid_validate_gob ( const struct m0_fid gob_fid)

Definition at line 93 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fid_validate_linuxstob()

M0_INTERNAL bool m0_fid_validate_linuxstob ( const struct m0_stob_id stob_id)

Definition at line 103 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function: