Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Architecture:

...

int smd_pool_add_tgt(uuid_t pool_id, uint32_t tgt_id, uint64_t blob_id,

enum smd_type smd_type, uint64_t blob_sz);

int smd_pool_get_blob(uuid_t pool_id, uint32_t tgt_id, enum smd_type smd_type, uint64_t *blob_id);

int smd_dev_add_tgt(uuid_t dev_id, uint32_t tgt_id, enum smd_type smd_type);

int smd_dev_del_tgt(uuid_t dev_id, uint32_t tgt_id, enum smd_type smd_type);

int smd_dev_get_by_tgt(uint32_t tgt_id, enum smd_type smd_type, struct smd_dev_info **dev_info);

...

struct smd_pool_info {
d_list_t spi_link;
uuid_t spi_id;
uint64_t spi_blobs_sz[SMD_TYPE_MAX];
uint32_t spi_tgt_cnt;
int *spi_tgts[SMD_TYPE_MAX];
uint64_t *spi_blobs[SMD_TYPE_MAX];
};

SMD interoperability

When DAOS was upgraded to newer version(PMEM for metadata), SMD should be able to read existed target and pool table.

...

New BIO APIs will be added (refer to details WAL Detailed Design )

Other changes:

XS0 will need a NVME context to access NVME device(for RDB, meta-data service), a special target id -2 will be used to differ it from main XS NVME context.

Sysdb changes

...

SYSDB changes

To make SYSDB independent of SMD, following new API will be added:

Code Block
int bio_sys_create(struct bio_xs_context *xs_ctxt, uint64_t blob_sz);
int bio_sys_open(struct bio_io_context *ctxt, bool async)
int bio_sys_close(struct bio_io_context *ctxt, bool async)

struct bio_xs_context need be extended:

bxc_tgt_id will be assigned as -2 if this is for system XS, To duplicate SMD on all Metadata SSDs in the future, number of bio_blobstores

will be different between main XS(SMD_TYPE_MAX=3 for now) and system XS(number of metadata SSDs).

Code Block
struct bio_xs_context {
        int                     bxc_tgt_id;
        struct spdk_thread     *bxc_thread;
        struct bio_blobstore  **bxc_blobstores;
        unsigned int            bxc_blobstore_num;
        struct bio_dma_buffer   bxc_dma_buf;
        unsigned int            bxc_ready:1,           /* xstream setup finished */
                                bxc_self_polling:1;    /* for standalone VOS */
};

SMD Blobstores will be init during init_bio_bdevs() which will scan spdk dev list and attach all meta device to system context.