Browse Source

Move C/C++ sources to src subdirectory

tags/v0.5.5
Vitaliy Filippov 1 month ago
parent
commit
bf9a175efc
87 changed files with 194 additions and 189 deletions
  1. +1
    -184
      CMakeLists.txt
  2. +188
    -0
      src/CMakeLists.txt
  3. +0
    -0
      src/allocator.cpp
  4. +0
    -0
      src/allocator.h
  5. +0
    -0
      src/base64.cpp
  6. +0
    -0
      src/base64.h
  7. +0
    -0
      src/blockstore.cpp
  8. +0
    -0
      src/blockstore.h
  9. +0
    -0
      src/blockstore_flush.cpp
  10. +0
    -0
      src/blockstore_flush.h
  11. +0
    -0
      src/blockstore_impl.cpp
  12. +0
    -0
      src/blockstore_impl.h
  13. +0
    -0
      src/blockstore_init.cpp
  14. +0
    -0
      src/blockstore_init.h
  15. +0
    -0
      src/blockstore_journal.cpp
  16. +0
    -0
      src/blockstore_journal.h
  17. +0
    -0
      src/blockstore_open.cpp
  18. +0
    -0
      src/blockstore_read.cpp
  19. +0
    -0
      src/blockstore_rollback.cpp
  20. +0
    -0
      src/blockstore_stable.cpp
  21. +0
    -0
      src/blockstore_sync.cpp
  22. +0
    -0
      src/blockstore_write.cpp
  23. +0
    -0
      src/cluster_client.cpp
  24. +0
    -0
      src/cluster_client.h
  25. +0
    -0
      src/crc32c.c
  26. +0
    -0
      src/crc32c.h
  27. +0
    -0
      src/dump_journal.cpp
  28. +0
    -0
      src/epoll_manager.cpp
  29. +0
    -0
      src/epoll_manager.h
  30. +0
    -0
      src/etcd_state_client.cpp
  31. +0
    -0
      src/etcd_state_client.h
  32. +0
    -0
      src/fio_cluster.cpp
  33. +0
    -0
      src/fio_engine.cpp
  34. +0
    -0
      src/fio_headers.h
  35. +0
    -0
      src/fio_sec_osd.cpp
  36. +0
    -0
      src/http_client.cpp
  37. +0
    -0
      src/http_client.h
  38. +0
    -0
      src/malloc_or_die.h
  39. +0
    -0
      src/messenger.cpp
  40. +0
    -0
      src/messenger.h
  41. +0
    -0
      src/msgr_receive.cpp
  42. +0
    -0
      src/msgr_send.cpp
  43. +0
    -0
      src/nbd_proxy.cpp
  44. +0
    -0
      src/object_id.h
  45. +0
    -0
      src/osd.cpp
  46. +0
    -0
      src/osd.h
  47. +0
    -0
      src/osd_cluster.cpp
  48. +0
    -0
      src/osd_flush.cpp
  49. +0
    -0
      src/osd_id.h
  50. +0
    -0
      src/osd_main.cpp
  51. +0
    -0
      src/osd_ops.cpp
  52. +0
    -0
      src/osd_ops.h
  53. +0
    -0
      src/osd_peering.cpp
  54. +0
    -0
      src/osd_peering_pg.cpp
  55. +0
    -0
      src/osd_peering_pg.h
  56. +0
    -0
      src/osd_peering_pg_test.cpp
  57. +0
    -0
      src/osd_primary.cpp
  58. +0
    -0
      src/osd_primary.h
  59. +0
    -0
      src/osd_primary_subops.cpp
  60. +0
    -0
      src/osd_rmw.cpp
  61. +0
    -0
      src/osd_rmw.h
  62. +0
    -0
      src/osd_rmw_test.cpp
  63. +0
    -0
      src/osd_secondary.cpp
  64. +0
    -0
      src/osd_test.cpp
  65. +0
    -0
      src/pg_states.cpp
  66. +0
    -0
      src/pg_states.h
  67. +0
    -0
      src/qemu_driver.c
  68. +0
    -0
      src/qemu_proxy.cpp
  69. +0
    -0
      src/qemu_proxy.h
  70. +0
    -0
      src/ringloop.cpp
  71. +0
    -0
      src/ringloop.h
  72. +0
    -0
      src/rm_inode.cpp
  73. +0
    -0
      src/rw_blocking.cpp
  74. +0
    -0
      src/rw_blocking.h
  75. +0
    -0
      src/stub_bench.cpp
  76. +0
    -0
      src/stub_osd.cpp
  77. +0
    -0
      src/stub_uring_osd.cpp
  78. +0
    -0
      src/test_allocator.cpp
  79. +0
    -0
      src/test_blockstore.cpp
  80. +0
    -0
      src/test_pattern.h
  81. +0
    -0
      src/test_shit.cpp
  82. +0
    -0
      src/timerfd_interval.cpp
  83. +0
    -0
      src/timerfd_interval.h
  84. +0
    -0
      src/timerfd_manager.cpp
  85. +0
    -0
      src/timerfd_manager.h
  86. +0
    -0
      src/xor.h
  87. +5
    -5
      tests/test_write.sh

+ 1
- 184
CMakeLists.txt View File

@@ -2,187 +2,4 @@ cmake_minimum_required(VERSION 2.8)

project(vitastor)

include(GNUInstallDirs)

set(QEMU_PLUGINDIR qemu CACHE STRING "QEMU plugin directory suffix (qemu-kvm on RHEL)")
set(WITH_ASAN false CACHE BOOL "Build with AddressSanitizer")
if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/local/?$")
if(EXISTS "/etc/debian_version")
set(CMAKE_INSTALL_LIBDIR "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()

add_definitions(-DVERSION="0.6-dev")
add_definitions(-Wall -Wno-sign-compare -Wno-comment -Wno-parentheses -Wno-pointer-arith)
if (${WITH_ASAN})
add_definitions(-fsanitize=address -fno-omit-frame-pointer)
add_link_options(-fsanitize=address -fno-omit-frame-pointer)
endif (${WITH_ASAN})

set(CMAKE_BUILD_TYPE RelWithDebInfo)
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")

find_package(PkgConfig)
pkg_check_modules(LIBURING REQUIRED liburing)
pkg_check_modules(GLIB REQUIRED glib-2.0)

include_directories(
src
/usr/include/jerasure
${LIBURING_INCLUDE_DIRS}
)

# libvitastor_blk.so
add_library(vitastor_blk SHARED
allocator.cpp blockstore.cpp blockstore_impl.cpp blockstore_init.cpp blockstore_open.cpp blockstore_journal.cpp blockstore_read.cpp
blockstore_write.cpp blockstore_sync.cpp blockstore_stable.cpp blockstore_rollback.cpp blockstore_flush.cpp crc32c.c ringloop.cpp
)
target_link_libraries(vitastor_blk
${LIBURING_LIBRARIES}
tcmalloc_minimal
)

# libfio_vitastor_blk.so
add_library(fio_vitastor_blk SHARED
fio_engine.cpp
json11/json11.cpp
)
target_link_libraries(fio_vitastor_blk
vitastor_blk
)

# vitastor-osd
add_executable(vitastor-osd
osd_main.cpp osd.cpp osd_secondary.cpp msgr_receive.cpp msgr_send.cpp osd_peering.cpp osd_flush.cpp osd_peering_pg.cpp
osd_primary.cpp osd_primary_subops.cpp etcd_state_client.cpp messenger.cpp osd_cluster.cpp http_client.cpp osd_ops.cpp pg_states.cpp
osd_rmw.cpp base64.cpp timerfd_manager.cpp epoll_manager.cpp json11/json11.cpp
)
target_link_libraries(vitastor-osd
vitastor_blk
Jerasure
)

# libfio_vitastor_sec.so
add_library(fio_vitastor_sec SHARED
fio_sec_osd.cpp
rw_blocking.cpp
)
target_link_libraries(fio_vitastor_sec
tcmalloc_minimal
)

# libvitastor_client.so
add_library(vitastor_client SHARED
cluster_client.cpp epoll_manager.cpp etcd_state_client.cpp
messenger.cpp msgr_send.cpp msgr_receive.cpp ringloop.cpp json11/json11.cpp
http_client.cpp osd_ops.cpp pg_states.cpp timerfd_manager.cpp base64.cpp
)
target_link_libraries(vitastor_client
tcmalloc_minimal
${LIBURING_LIBRARIES}
)

# libfio_vitastor.so
add_library(fio_vitastor SHARED
fio_cluster.cpp
)
target_link_libraries(fio_vitastor
vitastor_client
)

# vitastor-nbd
add_executable(vitastor-nbd
nbd_proxy.cpp
)
target_link_libraries(vitastor-nbd
vitastor_client
)

# vitastor-rm
add_executable(vitastor-rm
rm_inode.cpp
)
target_link_libraries(vitastor-rm
vitastor_client
)

# vitastor-dump-journal
add_executable(vitastor-dump-journal
dump_journal.cpp crc32c.c
)

# qemu_driver.so
add_library(qemu_proxy STATIC qemu_proxy.cpp)
target_compile_options(qemu_proxy PUBLIC -fPIC)
target_include_directories(qemu_proxy PUBLIC
qemu/b/qemu
qemu/include
${GLIB_INCLUDE_DIRS}
)
target_link_libraries(qemu_proxy
vitastor_client
)
add_library(qemu_vitastor SHARED
qemu_driver.c
)
target_link_libraries(qemu_vitastor
qemu_proxy
)
set_target_properties(qemu_vitastor PROPERTIES
PREFIX ""
OUTPUT_NAME "block-vitastor"
)

### Test stubs

# stub_osd, stub_bench, osd_test
add_executable(stub_osd stub_osd.cpp rw_blocking.cpp)
target_link_libraries(stub_osd tcmalloc_minimal)
add_executable(stub_bench stub_bench.cpp rw_blocking.cpp)
target_link_libraries(stub_bench tcmalloc_minimal)
add_executable(osd_test osd_test.cpp rw_blocking.cpp)
target_link_libraries(osd_test tcmalloc_minimal)

# osd_rmw_test
add_executable(osd_rmw_test osd_rmw_test.cpp allocator.cpp)
target_link_libraries(osd_rmw_test Jerasure tcmalloc_minimal)

# stub_uring_osd
add_executable(stub_uring_osd
stub_uring_osd.cpp epoll_manager.cpp messenger.cpp msgr_send.cpp msgr_receive.cpp ringloop.cpp timerfd_manager.cpp json11/json11.cpp
)
target_link_libraries(stub_uring_osd
${LIBURING_LIBRARIES}
tcmalloc_minimal
)

# osd_peering_pg_test
add_executable(osd_peering_pg_test osd_peering_pg_test.cpp osd_peering_pg.cpp)
target_link_libraries(osd_peering_pg_test tcmalloc_minimal)

# test_allocator
add_executable(test_allocator test_allocator.cpp allocator.cpp)

## test_blockstore, test_shit
#add_executable(test_blockstore test_blockstore.cpp timerfd_interval.cpp)
#target_link_libraries(test_blockstore blockstore)
#add_executable(test_shit test_shit.cpp osd_peering_pg.cpp)
#target_link_libraries(test_shit ${LIBURING_LIBRARIES} m)

### Install

install(TARGETS vitastor-osd vitastor-dump-journal vitastor-nbd vitastor-rm RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS fio_vitastor fio_vitastor_blk fio_vitastor_sec vitastor_blk vitastor_client LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS qemu_vitastor LIBRARY DESTINATION /usr/${CMAKE_INSTALL_LIBDIR}/${QEMU_PLUGINDIR})
add_subdirectory(src)

+ 188
- 0
src/CMakeLists.txt View File

@@ -0,0 +1,188 @@
cmake_minimum_required(VERSION 2.8)

project(vitastor)

include(GNUInstallDirs)

set(QEMU_PLUGINDIR qemu CACHE STRING "QEMU plugin directory suffix (qemu-kvm on RHEL)")
set(WITH_ASAN false CACHE BOOL "Build with AddressSanitizer")
if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/local/?$")
if(EXISTS "/etc/debian_version")
set(CMAKE_INSTALL_LIBDIR "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()

add_definitions(-DVERSION="0.6-dev")
add_definitions(-Wall -Wno-sign-compare -Wno-comment -Wno-parentheses -Wno-pointer-arith)
if (${WITH_ASAN})
add_definitions(-fsanitize=address -fno-omit-frame-pointer)
add_link_options(-fsanitize=address -fno-omit-frame-pointer)
endif (${WITH_ASAN})

set(CMAKE_BUILD_TYPE RelWithDebInfo)
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
string(REGEX REPLACE "([\\/\\-]O)[12]?" "\\13" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
string(REGEX REPLACE "([\\/\\-]D) *NDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")

find_package(PkgConfig)
pkg_check_modules(LIBURING REQUIRED liburing)
pkg_check_modules(GLIB REQUIRED glib-2.0)

include_directories(
../
/usr/include/jerasure
${LIBURING_INCLUDE_DIRS}
)

# libvitastor_blk.so
add_library(vitastor_blk SHARED
allocator.cpp blockstore.cpp blockstore_impl.cpp blockstore_init.cpp blockstore_open.cpp blockstore_journal.cpp blockstore_read.cpp
blockstore_write.cpp blockstore_sync.cpp blockstore_stable.cpp blockstore_rollback.cpp blockstore_flush.cpp crc32c.c ringloop.cpp
)
target_link_libraries(vitastor_blk
${LIBURING_LIBRARIES}
tcmalloc_minimal
)

# libfio_vitastor_blk.so
add_library(fio_vitastor_blk SHARED
fio_engine.cpp
../json11/json11.cpp
)
target_link_libraries(fio_vitastor_blk
vitastor_blk
)

# vitastor-osd
add_executable(vitastor-osd
osd_main.cpp osd.cpp osd_secondary.cpp msgr_receive.cpp msgr_send.cpp osd_peering.cpp osd_flush.cpp osd_peering_pg.cpp
osd_primary.cpp osd_primary_subops.cpp etcd_state_client.cpp messenger.cpp osd_cluster.cpp http_client.cpp osd_ops.cpp pg_states.cpp
osd_rmw.cpp base64.cpp timerfd_manager.cpp epoll_manager.cpp ../json11/json11.cpp
)
target_link_libraries(vitastor-osd
vitastor_blk
Jerasure
)

# libfio_vitastor_sec.so
add_library(fio_vitastor_sec SHARED
fio_sec_osd.cpp
rw_blocking.cpp
)
target_link_libraries(fio_vitastor_sec
tcmalloc_minimal
)

# libvitastor_client.so
add_library(vitastor_client SHARED
cluster_client.cpp epoll_manager.cpp etcd_state_client.cpp
messenger.cpp msgr_send.cpp msgr_receive.cpp ringloop.cpp ../json11/json11.cpp
http_client.cpp osd_ops.cpp pg_states.cpp timerfd_manager.cpp base64.cpp
)
target_link_libraries(vitastor_client
tcmalloc_minimal
${LIBURING_LIBRARIES}
)

# libfio_vitastor.so
add_library(fio_vitastor SHARED
fio_cluster.cpp
)
target_link_libraries(fio_vitastor
vitastor_client
)

# vitastor-nbd
add_executable(vitastor-nbd
nbd_proxy.cpp
)
target_link_libraries(vitastor-nbd
vitastor_client
)

# vitastor-rm
add_executable(vitastor-rm
rm_inode.cpp
)
target_link_libraries(vitastor-rm
vitastor_client
)

# vitastor-dump-journal
add_executable(vitastor-dump-journal
dump_journal.cpp crc32c.c
)

# qemu_driver.so
add_library(qemu_proxy STATIC qemu_proxy.cpp)
target_compile_options(qemu_proxy PUBLIC -fPIC)
target_include_directories(qemu_proxy PUBLIC
../qemu/b/qemu
../qemu/include
${GLIB_INCLUDE_DIRS}
)
target_link_libraries(qemu_proxy
vitastor_client
)
add_library(qemu_vitastor SHARED
qemu_driver.c
)
target_link_libraries(qemu_vitastor
qemu_proxy
)
set_target_properties(qemu_vitastor PROPERTIES
PREFIX ""
OUTPUT_NAME "block-vitastor"
)

### Test stubs

# stub_osd, stub_bench, osd_test
add_executable(stub_osd stub_osd.cpp rw_blocking.cpp)
target_link_libraries(stub_osd tcmalloc_minimal)
add_executable(stub_bench stub_bench.cpp rw_blocking.cpp)
target_link_libraries(stub_bench tcmalloc_minimal)
add_executable(osd_test osd_test.cpp rw_blocking.cpp)
target_link_libraries(osd_test tcmalloc_minimal)

# osd_rmw_test
add_executable(osd_rmw_test osd_rmw_test.cpp allocator.cpp)
target_link_libraries(osd_rmw_test Jerasure tcmalloc_minimal)

# stub_uring_osd
add_executable(stub_uring_osd
stub_uring_osd.cpp epoll_manager.cpp messenger.cpp msgr_send.cpp msgr_receive.cpp ringloop.cpp timerfd_manager.cpp ../json11/json11.cpp
)
target_link_libraries(stub_uring_osd
${LIBURING_LIBRARIES}
tcmalloc_minimal
)

# osd_peering_pg_test
add_executable(osd_peering_pg_test osd_peering_pg_test.cpp osd_peering_pg.cpp)
target_link_libraries(osd_peering_pg_test tcmalloc_minimal)

# test_allocator
add_executable(test_allocator test_allocator.cpp allocator.cpp)

## test_blockstore, test_shit
#add_executable(test_blockstore test_blockstore.cpp timerfd_interval.cpp)
#target_link_libraries(test_blockstore blockstore)
#add_executable(test_shit test_shit.cpp osd_peering_pg.cpp)
#target_link_libraries(test_shit ${LIBURING_LIBRARIES} m)

### Install

install(TARGETS vitastor-osd vitastor-dump-journal vitastor-nbd vitastor-rm RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS fio_vitastor fio_vitastor_blk fio_vitastor_sec vitastor_blk vitastor_client LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS qemu_vitastor LIBRARY DESTINATION /usr/${CMAKE_INSTALL_LIBDIR}/${QEMU_PLUGINDIR})

allocator.cpp → src/allocator.cpp View File


allocator.h → src/allocator.h View File


base64.cpp → src/base64.cpp View File


base64.h → src/base64.h View File


blockstore.cpp → src/blockstore.cpp View File


blockstore.h → src/blockstore.h View File


blockstore_flush.cpp → src/blockstore_flush.cpp View File


blockstore_flush.h → src/blockstore_flush.h View File


blockstore_impl.cpp → src/blockstore_impl.cpp View File


blockstore_impl.h → src/blockstore_impl.h View File


blockstore_init.cpp → src/blockstore_init.cpp View File


blockstore_init.h → src/blockstore_init.h View File


blockstore_journal.cpp → src/blockstore_journal.cpp View File


blockstore_journal.h → src/blockstore_journal.h View File


blockstore_open.cpp → src/blockstore_open.cpp View File


blockstore_read.cpp → src/blockstore_read.cpp View File


blockstore_rollback.cpp → src/blockstore_rollback.cpp View File


blockstore_stable.cpp → src/blockstore_stable.cpp View File


blockstore_sync.cpp → src/blockstore_sync.cpp View File


blockstore_write.cpp → src/blockstore_write.cpp View File


cluster_client.cpp → src/cluster_client.cpp View File


cluster_client.h → src/cluster_client.h View File


crc32c.c → src/crc32c.c View File


crc32c.h → src/crc32c.h View File


dump_journal.cpp → src/dump_journal.cpp View File


epoll_manager.cpp → src/epoll_manager.cpp View File


epoll_manager.h → src/epoll_manager.h View File


etcd_state_client.cpp → src/etcd_state_client.cpp View File


etcd_state_client.h → src/etcd_state_client.h View File


fio_cluster.cpp → src/fio_cluster.cpp View File


fio_engine.cpp → src/fio_engine.cpp View File


fio_headers.h → src/fio_headers.h View File


fio_sec_osd.cpp → src/fio_sec_osd.cpp View File


http_client.cpp → src/http_client.cpp View File


http_client.h → src/http_client.h View File


malloc_or_die.h → src/malloc_or_die.h View File


messenger.cpp → src/messenger.cpp View File


messenger.h → src/messenger.h View File


msgr_receive.cpp → src/msgr_receive.cpp View File


msgr_send.cpp → src/msgr_send.cpp View File


nbd_proxy.cpp → src/nbd_proxy.cpp View File


object_id.h → src/object_id.h View File


osd.cpp → src/osd.cpp View File


osd.h → src/osd.h View File


osd_cluster.cpp → src/osd_cluster.cpp View File


osd_flush.cpp → src/osd_flush.cpp View File


osd_id.h → src/osd_id.h View File


osd_main.cpp → src/osd_main.cpp View File


osd_ops.cpp → src/osd_ops.cpp View File


osd_ops.h → src/osd_ops.h View File


osd_peering.cpp → src/osd_peering.cpp View File


osd_peering_pg.cpp → src/osd_peering_pg.cpp View File


osd_peering_pg.h → src/osd_peering_pg.h View File


osd_peering_pg_test.cpp → src/osd_peering_pg_test.cpp View File


osd_primary.cpp → src/osd_primary.cpp View File


osd_primary.h → src/osd_primary.h View File


osd_primary_subops.cpp → src/osd_primary_subops.cpp View File


osd_rmw.cpp → src/osd_rmw.cpp View File


osd_rmw.h → src/osd_rmw.h View File


osd_rmw_test.cpp → src/osd_rmw_test.cpp View File


osd_secondary.cpp → src/osd_secondary.cpp View File


osd_test.cpp → src/osd_test.cpp View File


pg_states.cpp → src/pg_states.cpp View File


pg_states.h → src/pg_states.h View File


qemu_driver.c → src/qemu_driver.c View File


qemu_proxy.cpp → src/qemu_proxy.cpp View File


qemu_proxy.h → src/qemu_proxy.h View File


ringloop.cpp → src/ringloop.cpp View File


ringloop.h → src/ringloop.h View File


rm_inode.cpp → src/rm_inode.cpp View File


rw_blocking.cpp → src/rw_blocking.cpp View File


rw_blocking.h → src/rw_blocking.h View File


stub_bench.cpp → src/stub_bench.cpp View File


stub_osd.cpp → src/stub_osd.cpp View File


stub_uring_osd.cpp → src/stub_uring_osd.cpp View File


test_allocator.cpp → src/test_allocator.cpp View File


test_blockstore.cpp → src/test_blockstore.cpp View File


test_pattern.h → src/test_pattern.h View File


test_shit.cpp → src/test_shit.cpp View File


timerfd_interval.cpp → src/timerfd_interval.cpp View File


timerfd_interval.h → src/timerfd_interval.h View File


timerfd_manager.cpp → src/timerfd_manager.cpp View File


timerfd_manager.h → src/timerfd_manager.h View File


xor.h → src/xor.h View File


+ 5
- 5
tests/test_write.sh View File

@@ -6,11 +6,11 @@ dd if=/dev/zero of=./testdata/test_osd1.bin bs=1024 count=1 seek=$((1024*1024-1)
dd if=/dev/zero of=./testdata/test_osd2.bin bs=1024 count=1 seek=$((1024*1024-1))
dd if=/dev/zero of=./testdata/test_osd3.bin bs=1024 count=1 seek=$((1024*1024-1))

build/vitastor-osd --osd_num 1 --bind_address 127.0.0.1 --etcd_address $ETCD_URL $(node mon/simple-offsets.js --format options --device ./testdata/test_osd1.bin 2>/dev/null) &>./testdata/osd1.log &
build/src/vitastor-osd --osd_num 1 --bind_address 127.0.0.1 --etcd_address $ETCD_URL $(node mon/simple-offsets.js --format options --device ./testdata/test_osd1.bin 2>/dev/null) &>./testdata/osd1.log &
OSD1_PID=$!
build/vitastor-osd --osd_num 2 --bind_address 127.0.0.1 --etcd_address $ETCD_URL $(node mon/simple-offsets.js --format options --device ./testdata/test_osd2.bin 2>/dev/null) &>./testdata/osd2.log &
build/src/vitastor-osd --osd_num 2 --bind_address 127.0.0.1 --etcd_address $ETCD_URL $(node mon/simple-offsets.js --format options --device ./testdata/test_osd2.bin 2>/dev/null) &>./testdata/osd2.log &
OSD2_PID=$!
build/vitastor-osd --osd_num 3 --bind_address 127.0.0.1 --etcd_address $ETCD_URL $(node mon/simple-offsets.js --format options --device ./testdata/test_osd3.bin 2>/dev/null) &>./testdata/osd3.log &
build/src/vitastor-osd --osd_num 3 --bind_address 127.0.0.1 --etcd_address $ETCD_URL $(node mon/simple-offsets.js --format options --device ./testdata/test_osd3.bin 2>/dev/null) &>./testdata/osd3.log &
OSD3_PID=$!

cd mon
@@ -38,9 +38,9 @@ echo leak:librbd >> testdata/lsan-suppress.txt
echo leak:_M_mutate >> testdata/lsan-suppress.txt
echo leak:_M_assign >> testdata/lsan-suppress.txt
#LSAN_OPTIONS=suppressions=`pwd`/testdata/lsan-suppress.txt LD_PRELOAD=libasan.so.5 \
# fio -thread -name=test -ioengine=build/libfio_vitastor_sec.so -bs=4k -fsync=128 `$ETCDCTL get /vitastor/osd/state/1 --print-value-only | jq -r '"-host="+.addresses[0]+" -port="+(.port|tostring)'` -rw=write -size=32M
# fio -thread -name=test -ioengine=build/src/libfio_vitastor_sec.so -bs=4k -fsync=128 `$ETCDCTL get /vitastor/osd/state/1 --print-value-only | jq -r '"-host="+.addresses[0]+" -port="+(.port|tostring)'` -rw=write -size=32M

LSAN_OPTIONS=suppressions=`pwd`/testdata/lsan-suppress.txt LD_PRELOAD=libasan.so.5 \
fio -thread -name=test -ioengine=build/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=1G -cluster_log_level=10
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=4M -direct=1 -iodepth=1 -fsync=1 -rw=write -etcd=$ETCD_URL -pool=1 -inode=1 -size=1G -cluster_log_level=10

format_green OK

Loading…
Cancel
Save