]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge PR #20516 into wip-sage-testing-20180407.023003
authorSage Weil <sage@redhat.com>
Sat, 7 Apr 2018 02:30:18 +0000 (21:30 -0500)
committerSage Weil <sage@redhat.com>
Sat, 7 Apr 2018 02:30:18 +0000 (21:30 -0500)
* refs/pull/20516/head:
os/filestore: advertise vdo in filestore metadata
os/filestore: implement thin provisioning utilization stats for VDO
os/bluestore/KernelDevice: advertise vdo and physical_size in metadata
os/bluestore/KernelDevice: implement thin utilization stats for VDO
os/bluestore: hook to expose utilization of thinly-provisioned device
common/blkdev: identify VDO devices beneath LVM
common/blkdev: implement VDO helper functions

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
1  2 
src/os/bluestore/BlockDevice.h
src/os/bluestore/BlueStore.cc
src/os/bluestore/KernelDevice.cc
src/os/bluestore/KernelDevice.h
src/os/filestore/FileStore.cc
src/os/filestore/FileStore.h

Simple merge
Simple merge
index 9bae23ce5bf57d5c3a98ac89b725e8bc5a4163dc,c1213a5fd6fb37fc1a323ba5cdeec7ee0e2b8773..76556a979b5b8abc5380a24a38f98723af95966a
@@@ -190,8 -189,16 +192,13 @@@ void KernelDevice::close(
  {
    dout(1) << __func__ << dendl;
    _aio_stop();
 -
 -  assert(fs);
 -  delete fs;
 -  fs = NULL;
 +  _discard_stop();
  
+   if (vdo_fd >= 0) {
+     VOID_TEMP_FAILURE_RETRY(::close(vdo_fd));
+     vdo_fd = -1;
+   }
    assert(fd_direct >= 0);
    VOID_TEMP_FAILURE_RETRY(::close(fd_direct));
    fd_direct = -1;
index a753e7be23853657e45c2ee99079c45e2b4815aa,2fa40a9b781c88049ecfc260fd7a9976e1f451e0..9f461ac0630216f18c823db683764cdbca21ebaa
  class KernelDevice : public BlockDevice {
    int fd_direct, fd_buffered;
    std::string path;
 -  FS *fs;
    bool aio, dio;
  
+   int vdo_fd = -1;      ///< fd for vdo sysfs directory
+   string vdo_name;
    std::string devname;  ///< kernel dev name (/sys/block/$devname), if any
  
    Mutex debug_lock;
    void debug_aio_link(aio_t& aio);
    void debug_aio_unlink(aio_t& aio);
  
+   void _detect_vdo();
  public:
 -  KernelDevice(CephContext* cct, aio_callback_t cb, void *cbpriv);
 +  KernelDevice(CephContext* cct, aio_callback_t cb, void *cbpriv, aio_callback_t d_cb, void *d_cbpriv);
  
    void aio_submit(IOContext *ioc) override;
 +  void discard_drain() override;
  
    int collect_metadata(const std::string& prefix, map<std::string,std::string> *pm) const override;
    int get_devname(std::string *s) override {
Simple merge
Simple merge