CacheLib icon indicating copy to clipboard operation
CacheLib copied to clipboard

Support multiple nvm devices in FDP mode

Open PapperYZ opened this issue 5 months ago • 0 comments

is it true that only one nvm device is supported with FDP enabled? Please comment if multiple NVM is supported in newer releases. I am using stable release v20240621 right now.

In Device.cpp, within the createDirectIoFileDevice() function:

if (isFDPEnabled) {
  try {
    if (filePaths.size() > 1) {
      throw std::invalid_argument(folly::sformat(
          "{} input files; but FDP mode does not support RAID files yet",
          filePaths.size()));
    }

This logic explicitly disallows multiple input files (i.e., multiple NVMe devices) when deviceEnableFDP: true. It throws an exception if more than one file/device is passed,

also

fdpNvmeVec.push_back(std::move(fdpNvme));
...
static constexpr uint16_t kDefaultFdpIdx = 0u;
return fdpNvmeVec_[kDefaultFdpIdx]->allocateFdpHandle();

So even though a vector is used (fdpNvmeVec_), only index 0 is ever accessed. This confirms only one FDP-enabled NVMe device is allowed and utilized.

PapperYZ avatar Aug 13 '25 18:08 PapperYZ