]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
blkdev: overhaul API for better portability
authorAlan Somers <asomers@gmail.com>
Wed, 4 Oct 2017 22:31:23 +0000 (16:31 -0600)
committerKefu Chai <kchai@redhat.com>
Fri, 19 Oct 2018 11:35:23 +0000 (19:35 +0800)
commitbde6c0de1c64d71545c9a3fbc4e999e5999f6240
treec5938e5cb64fc737d153cf12c71d8cd81d27235d
parent2fa3845d8f843f61ad687f50ed5bbcd161f894fe
blkdev: overhaul API for better portability

* Turn the API into a class so it will work with GoogleMock
* Take file descriptors for all methods, instead of a mix of file
  descriptors, path names, and canonical device names.  It's more
  consistent and it will work better with FreeBSD.
* Split get_device_by_fd into block_device_partition and
  block_device_wholedisk
* Remove dead code

Signed-off-by: Alan Somers <asomers@gmail.com>
12 files changed:
src/common/blkdev.cc
src/common/blkdev.h
src/os/bluestore/KernelDevice.cc
src/os/bluestore/PMEMDevice.cc
src/os/filestore/FileJournal.cc
src/os/filestore/FileStore.cc
src/os/filestore/GenericFileStoreBackend.cc
src/test/common/test_blkdev.cc
src/test/common/test_blkdev_sys_block/sys/dev/block/8:0 [new symlink]
src/test/common/test_blkdev_sys_block/sys/dev/block/9:0 [new symlink]
src/test/test_get_blkdev_props.cc
src/tools/rbd/action/Import.cc