examples/perf: close the fd for URING or AIO
Change-Id: Ieb120ad2d0e4de965b85ce12ac421fe0906dada2 Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15660 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
parent
c85df53551
commit
f43678c18e
@ -1313,6 +1313,15 @@ unregister_namespaces(void)
|
||||
TAILQ_FOREACH_SAFE(entry, &g_namespaces, link, tmp) {
|
||||
TAILQ_REMOVE(&g_namespaces, entry, link);
|
||||
spdk_zipf_free(&entry->zipf);
|
||||
if (g_use_uring) {
|
||||
#ifdef SPDK_CONFIG_URING
|
||||
close(entry->u.uring.fd);
|
||||
#endif
|
||||
} else {
|
||||
#if HAVE_LIBAIO
|
||||
close(entry->u.aio.fd);
|
||||
#endif
|
||||
}
|
||||
free(entry);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user