Simplified distributed block storage with strong consistency, like in Ceph
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
3.4 KiB

  1. BLOCKSTORE_OBJS := allocator.o blockstore.o blockstore_impl.o blockstore_init.o blockstore_open.o blockstore_journal.o blockstore_read.o \
  2. blockstore_write.o blockstore_sync.o blockstore_stable.o blockstore_rollback.o blockstore_flush.o crc32c.o ringloop.o timerfd_interval.o
  3. # -fsanitize=address
  4. CXXFLAGS := -g -O3 -Wall -Wno-sign-compare -Wno-comment -Wno-parentheses -Wno-pointer-arith -fPIC -fdiagnostics-color=always
  5. all: $(BLOCKSTORE_OBJS) libfio_blockstore.so osd libfio_sec_osd.so test_blockstore stub_osd stub_bench osd_test
  6. clean:
  7. rm -f *.o
  8. crc32c.o: crc32c.c
  9. g++ $(CXXFLAGS) -c -o $@ $<
  10. json11.o: json11/json11.cpp
  11. g++ $(CXXFLAGS) -c -o json11.o json11/json11.cpp
  12. allocator.o: allocator.cpp allocator.h
  13. g++ $(CXXFLAGS) -c -o $@ $<
  14. ringloop.o: ringloop.cpp ringloop.h
  15. g++ $(CXXFLAGS) -c -o $@ $<
  16. timerfd_interval.o: timerfd_interval.cpp timerfd_interval.h ringloop.h
  17. g++ $(CXXFLAGS) -c -o $@ $<
  18. %.o: %.cpp allocator.h blockstore_flush.h blockstore.h blockstore_impl.h blockstore_init.h blockstore_journal.h crc32c.h ringloop.h timerfd_interval.h object_id.h
  19. g++ $(CXXFLAGS) -c -o $@ $<
  20. libblockstore.so: $(BLOCKSTORE_OBJS)
  21. g++ $(CXXFLAGS) -o libblockstore.so -shared $(BLOCKSTORE_OBJS) -ltcmalloc_minimal -luring
  22. libfio_blockstore.so: ./libblockstore.so fio_engine.cpp json11.o
  23. g++ $(CXXFLAGS) -shared -o libfio_blockstore.so fio_engine.cpp json11.o ./libblockstore.so -ltcmalloc_minimal -luring
  24. OSD_OBJS := osd.o osd_secondary.o osd_receive.o osd_send.o osd_peering.o osd_peering_pg.o osd_primary.o osd_rmw.o json11.o timerfd_interval.o
  25. osd_secondary.o: osd_secondary.cpp osd.h osd_ops.h ringloop.h
  26. g++ $(CXXFLAGS) -c -o $@ $<
  27. osd_receive.o: osd_receive.cpp osd.h osd_ops.h ringloop.h
  28. g++ $(CXXFLAGS) -c -o $@ $<
  29. osd_send.o: osd_send.cpp osd.h osd_ops.h ringloop.h
  30. g++ $(CXXFLAGS) -c -o $@ $<
  31. osd_peering.o: osd_peering.cpp osd.h osd_ops.h osd_peering_pg.h ringloop.h
  32. g++ $(CXXFLAGS) -c -o $@ $<
  33. osd_peering_pg.o: osd_peering_pg.cpp object_id.h osd_peering_pg.h
  34. g++ $(CXXFLAGS) -c -o $@ $<
  35. osd_rmw.o: osd_rmw.cpp osd_rmw.h xor.h
  36. g++ $(CXXFLAGS) -c -o $@ $<
  37. osd_rmw_test: osd_rmw_test.cpp osd_rmw.cpp osd_rmw.h xor.h
  38. g++ $(CXXFLAGS) -o $@ $<
  39. osd_primary.o: osd_primary.cpp osd.h osd_ops.h osd_peering_pg.h xor.h ringloop.h
  40. g++ $(CXXFLAGS) -c -o $@ $<
  41. osd.o: osd.cpp osd.h osd_ops.h osd_peering_pg.h ringloop.h
  42. g++ $(CXXFLAGS) -c -o $@ $<
  43. osd: ./libblockstore.so osd_main.cpp osd.h osd_ops.h $(OSD_OBJS)
  44. g++ $(CXXFLAGS) -o osd osd_main.cpp $(OSD_OBJS) ./libblockstore.so -ltcmalloc_minimal -luring
  45. stub_osd: stub_osd.cpp osd_ops.h rw_blocking.o
  46. g++ $(CXXFLAGS) -o stub_osd stub_osd.cpp rw_blocking.o -ltcmalloc_minimal
  47. stub_bench: stub_bench.cpp osd_ops.h rw_blocking.o
  48. g++ $(CXXFLAGS) -o stub_bench stub_bench.cpp rw_blocking.o -ltcmalloc_minimal
  49. rw_blocking.o: rw_blocking.cpp rw_blocking.h
  50. g++ $(CXXFLAGS) -c -o $@ $<
  51. osd_test: osd_test.cpp osd_ops.h rw_blocking.o
  52. g++ $(CXXFLAGS) -o osd_test osd_test.cpp rw_blocking.o -ltcmalloc_minimal
  53. libfio_sec_osd.so: fio_sec_osd.cpp osd_ops.h rw_blocking.o
  54. g++ $(CXXFLAGS) -ltcmalloc_minimal -shared -o libfio_sec_osd.so fio_sec_osd.cpp rw_blocking.o -luring
  55. test_blockstore: ./libblockstore.so test_blockstore.cpp
  56. g++ $(CXXFLAGS) -o test_blockstore test_blockstore.cpp ./libblockstore.so -ltcmalloc_minimal -luring
  57. test: test.cpp osd_peering_pg.o
  58. g++ $(CXXFLAGS) -o test test.cpp osd_peering_pg.o -luring
  59. test_allocator: test_allocator.cpp allocator.o
  60. g++ $(CXXFLAGS) -o test_allocator test_allocator.cpp allocator.o