static std::atomic<bool> init_prereq = {false};
void Infiniband::verify_prereq(CephContext *cct) {
-
- //On RDMA MUST be called before fork
- int rc = ibv_fork_init();
- if (rc) {
- lderr(cct) << __func__ << " failed to call ibv_for_init(). On RDMA must be called before fork. Application aborts." << dendl;
- ceph_abort();
- }
-
+ int rc = 0;
ldout(cct, 20) << __func__ << " ms_async_rdma_enable_hugepage value is: " << cct->_conf->ms_async_rdma_enable_hugepage << dendl;
if (cct->_conf->ms_async_rdma_enable_hugepage){
rc = setenv("RDMAV_HUGEPAGES_SAFE","1",1);
}
}
+ //On RDMA MUST be called before fork
+ rc = ibv_fork_init();
+ if (rc) {
+ lderr(cct) << __func__ << " failed to call ibv_for_init(). On RDMA must be called before fork. Application aborts." << dendl;
+ ceph_abort();
+ }
+
//Check ulimit
struct rlimit limit;
getrlimit(RLIMIT_MEMLOCK, &limit);