mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
os/ObjectStore: add get_devices() method
The intent here is to return the set of hardware storage devices, as identified by the "devname" (i.e., the directory name for the device in /sys/block/). For example, "sda", "nvme0n1", etc. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
6b3b0afc28
commit
f709da6f2c
@ -1562,6 +1562,11 @@ public:
|
||||
virtual bool wants_journal() = 0; //< prefers a journal
|
||||
virtual bool allows_journal() = 0; //< allows a journal
|
||||
|
||||
/// enumerate hardware devices (by 'devname', e.g., 'sda' as in /sys/block/sda)
|
||||
virtual int get_devices(std::set<string> *devls) {
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/**
|
||||
* is_rotational
|
||||
*
|
||||
|
@ -280,6 +280,11 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
int get_devices(set<string> *ls) override {
|
||||
// no devices for us!
|
||||
return 0;
|
||||
}
|
||||
|
||||
int statfs(struct store_statfs_t *buf) override;
|
||||
|
||||
bool exists(const coll_t& cid, const ghobject_t& oid) override;
|
||||
|
Loading…
Reference in New Issue
Block a user