]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
src: extract backend driver from bluestore to access device
authorChangcheng Liu <changcheng.liu@aliyun.com>
Tue, 21 Apr 2020 05:38:53 +0000 (13:38 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Thu, 28 May 2020 02:20:55 +0000 (10:20 +0800)
commitb734735a0db9a5dac1b2eb015e4b166dae17fd96
treeb80bdc16d25adccc3b26d129ad7a0aa45195e6d0
parentb63ae1492751de414ba83b8541ca3c99a357dafb
src: extract backend driver from bluestore to access device

1. Both bluestore or other component e.g. rbd could use the same
   driver to access storage device. It's better to use one library
   to integrate the driver.
2. os and crimson-alienstore are static libraries. Link blk library into
   them.

Main changes are below:
1. move backend driver into src/blk
   src/$ mkdir -p blk/{aio,kernel,spdk,pmem,zns}
   src/$ mv os/bluestore/{BlockDevice.h,BlockDevice.cc} blk
   src/$ mv os/bluestore/{ceph_aio.h} aio/aio.h
   src/$ mv os/bluestore/{aio.cc} aio/
   src/$ mv os/bluestore/{KernelDevice.h,KernelDevice.cc} kernel/
   src/$ mv os/bluestore/{ceph_io_uring.h} kernel/io_uring.h
   src/$ mv os/bluestore/{io_uring.cc} kernel_drv/
   src/$ mv os/bluestore/{NVMEDevice.h,NVMEDevice.cc} spdk/
   src/$ mv os/bluestore/{PMEMDevice.h,PMEMDevice.cc} pmem/
   src/$ mv os/bluestore/{HMSMRDevice.h,HMSMRDevice.cc} zns/
2. customize macro name in header file to remove bluestore specific text
3. adjust header file patch in source code
4. create cmake rule blk/CMakeLists.txt to build blk
5. modify src/CMakeLists.txt to integrate blk
6. modify other CMakeLists.txt to adapt to new file structure.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
Co-authored-by: Kefu Chai <kefu@redhat.com>
37 files changed:
src/CMakeLists.txt
src/blk/BlockDevice.cc [new file with mode: 0644]
src/blk/BlockDevice.h [new file with mode: 0644]
src/blk/CMakeLists.txt [new file with mode: 0644]
src/blk/aio/aio.cc [new file with mode: 0644]
src/blk/aio/aio.h [new file with mode: 0644]
src/blk/kernel/KernelDevice.cc [new file with mode: 0644]
src/blk/kernel/KernelDevice.h [new file with mode: 0644]
src/blk/kernel/io_uring.cc [new file with mode: 0644]
src/blk/kernel/io_uring.h [new file with mode: 0644]
src/blk/pmem/PMEMDevice.cc [new file with mode: 0644]
src/blk/pmem/PMEMDevice.h [new file with mode: 0644]
src/blk/spdk/NVMEDevice.cc [new file with mode: 0644]
src/blk/spdk/NVMEDevice.h [new file with mode: 0644]
src/blk/zns/HMSMRDevice.cc [new file with mode: 0644]
src/blk/zns/HMSMRDevice.h [new file with mode: 0644]
src/crimson/os/alienstore/CMakeLists.txt
src/librbd/CMakeLists.txt
src/os/CMakeLists.txt
src/os/bluestore/BlockDevice.cc [deleted file]
src/os/bluestore/BlockDevice.h [deleted file]
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h
src/os/bluestore/BlueStore.h
src/os/bluestore/HMSMRDevice.cc [deleted file]
src/os/bluestore/HMSMRDevice.h [deleted file]
src/os/bluestore/KernelDevice.cc [deleted file]
src/os/bluestore/KernelDevice.h [deleted file]
src/os/bluestore/NVMEDevice.cc [deleted file]
src/os/bluestore/NVMEDevice.h [deleted file]
src/os/bluestore/PMEMDevice.cc [deleted file]
src/os/bluestore/PMEMDevice.h [deleted file]
src/os/bluestore/aio.cc [deleted file]
src/os/bluestore/ceph_aio.h [deleted file]
src/os/bluestore/ceph_io_uring.h [deleted file]
src/os/bluestore/io_uring.cc [deleted file]
src/test/objectstore/test_bdev.cc