diff --git a/test/unit/lib/bdev/bdev.c/bdev_ut.c b/test/unit/lib/bdev/bdev.c/bdev_ut.c index 3964c96cc..4b9e66fbd 100644 --- a/test/unit/lib/bdev/bdev.c/bdev_ut.c +++ b/test/unit/lib/bdev/bdev.c/bdev_ut.c @@ -1,8 +1,8 @@ /*- * BSD LICENSE * - * Copyright (c) Intel Corporation. - * All rights reserved. + * Copyright (c) Intel Corporation. All rights reserved. + * Copyright (c) 2019 Mellanox Technologies LTD. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -416,6 +416,24 @@ get_device_stat_cb(struct spdk_bdev *bdev, struct spdk_bdev_io_stat *stat, void *(bool *)cb_arg = true; } +static void +bdev_open_cb1(enum spdk_bdev_event_type type, struct spdk_bdev *bdev, void *event_ctx) +{ + struct spdk_bdev_desc *desc = *(struct spdk_bdev_desc **)event_ctx; + + g_event_type1 = type; + spdk_bdev_close(desc); +} + +static void +bdev_open_cb2(enum spdk_bdev_event_type type, struct spdk_bdev *bdev, void *event_ctx) +{ + struct spdk_bdev_desc *desc = *(struct spdk_bdev_desc **)event_ctx; + + g_event_type2 = type; + spdk_bdev_close(desc); +} + static void get_device_stat_test(void) { @@ -2000,24 +2018,6 @@ bdev_open_while_hotremove(void) free_bdev(bdev); } -static void -bdev_open_cb1(enum spdk_bdev_event_type type, struct spdk_bdev *bdev, void *event_ctx) -{ - struct spdk_bdev_desc *desc = *(struct spdk_bdev_desc **)event_ctx; - - g_event_type1 = type; - spdk_bdev_close(desc); -} - -static void -bdev_open_cb2(enum spdk_bdev_event_type type, struct spdk_bdev *bdev, void *event_ctx) -{ - struct spdk_bdev_desc *desc = *(struct spdk_bdev_desc **)event_ctx; - - g_event_type2 = type; - spdk_bdev_close(desc); -} - static void bdev_open_ext(void) {