Skip to content

Commit

Permalink
fix macro
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonYao287 committed May 14, 2024
1 parent f9645ab commit 5216f23
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/device/virtual_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ namespace homestore {
#define SYNC_FLIP_INJECTION(IO_TYPE) \
if (iomgr_flip::instance()->test_flip("IO_TYPE_failure")) { return std::make_error_code(std::errc::io_error); } \
if (iomgr_flip::instance()->test_flip("IO_TYPE_stuck")) { \
std::this_thread::sleep_for(std::chrono::hours(24 * 365 * 100)); // Sleep for 100 years\
return std::make_error_code(std::errc::resource_unavailable_try_again);\
std::this_thread::sleep_for(std::chrono::hours(24 * 365 * 100)); /* Sleep for 100 years */ \
return std::make_error_code(std::errc::resource_unavailable_try_again); \
}

#define ASYNC_FLIP_INJECTION(IO_TYPE) \
if (iomgr_flip::instance()->test_flip("IO_TYPE_failure")) { \
return folly::makeFuture< std::error_code >(std::make_error_code(std::errc::io_error)); \
} \
if (iomgr_flip::instance()->test_flip("IO_TYPE_stuck")) { \
std::this_thread::sleep_for(std::chrono::hours(24 * 365 * 100)); // Sleep for 100 years\
return folly::makeFuture< std::error_code >(std::make_error_code(std::errc::resource_unavailable_try_again));\
}
std::this_thread::sleep_for(std::chrono::hours(24 * 365 * 100)); /* Sleep for 100 years */ \
return folly::makeFuture< std::error_code >(std::make_error_code(std::errc::resource_unavailable_try_again)); \
}
#endif

static std::shared_ptr< BlkAllocator > create_blk_allocator(blk_allocator_type_t btype, uint32_t vblock_size,
Expand Down

0 comments on commit 5216f23

Please sign in to comment.