From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2511712437416069263==" MIME-Version: 1.0 From: Cao, Gang Subject: [SPDK] Re: Some questions about SPDK bdev module Date: Thu, 10 Feb 2022 04:26:15 +0000 Message-ID: In-Reply-To: 20220210031815.3721.30419@ml01.vlan13.01.org List-ID: To: spdk@lists.01.org --===============2511712437416069263== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable For 1st question, the bdev close/destruct is usually in the aysnc mode if t= here are ongoing IOs. The SPDK bdev framework will handle that from my unde= rstanding. For 2nd question, take nvme bdev as example, there is a config_json functio= n pointer for the json related configuration. And for the specific log related, you could take a look at SPDK_LOG_REGISTE= R_COMPONENT macro first. static struct spdk_bdev_module nvme_if =3D { .name =3D "nvme", .async_fini =3D true, .module_init =3D bdev_nvme_library_init, .module_fini =3D bdev_nvme_library_fini, .config_json =3D bdev_nvme_config_json, .get_ctx_size =3D bdev_nvme_get_ctx_size, }; SPDK_BDEV_MODULE_REGISTER(nvme, &nvme_if) -----Original Message----- From: liushengchao02(a)meituan.com = Sent: Thursday, February 10, 2022 11:18 To: spdk(a)lists.01.org Subject: [SPDK] Some questions about SPDK bdev module I have read the source code of SPDK and implemented my own bdev module by r= eferencing official bdev modules like null, malloc and aio. But I still hav= e some questions and hope someone can explain. 1.When a bdev is deleted, the 'destruct' function pointer of spdk_bdev_fn_t= able is called and the block device is closed. I find that ongoing spdk_bde= v_io is not explicitly completed by calling spdk_bdev_io_complete(). Are th= ese spdk_bdev_io cleaned automatically by SPDK framework? 2.How to write the json config that corresponds to the rpc call of 'log_set= _flag'? I have tried many ways but still can not work and I have to impleme= nt my own version of rpc call in my own bdev module to enable json config. Thanks! _______________________________________________ SPDK mailing list -- spdk(a)lists.01.org To unsubscribe send an email to spdk-leave(a)lists.01.org --===============2511712437416069263==--