This reverts commit
9b790ba0f5606c0a91563828fa43f5e4ae210425.
Change-Id: Ibca8e813ec7372510709578e33309140e8fc7b5f
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33802
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
{
LASSERT(fpo->fpo_map_count == 0);
{
LASSERT(fpo->fpo_map_count == 0);
- if (!IS_ERR_OR_NULL(fpo->fmr.fpo_fmr_pool)) {
+ if (fpo->fpo_is_fmr && fpo->fmr.fpo_fmr_pool) {
ib_destroy_fmr_pool(fpo->fmr.fpo_fmr_pool);
ib_destroy_fmr_pool(fpo->fmr.fpo_fmr_pool);
- fpo->fmr.fpo_fmr_pool = NULL;
} else {
struct kib_fast_reg_descriptor *frd, *tmp;
int i = 0;
} else {
struct kib_fast_reg_descriptor *frd, *tmp;
int i = 0;
else
CERROR("FMRs are not supported\n");
}
else
CERROR("FMRs are not supported\n");
}
+ fpo->fpo_is_fmr = true;
struct kib_fast_reg_descriptor *frd, *tmp;
int i, rc;
struct kib_fast_reg_descriptor *frd, *tmp;
int i, rc;
+ fpo->fpo_is_fmr = false;
+
INIT_LIST_HEAD(&fpo->fast_reg.fpo_pool_list);
fpo->fast_reg.fpo_pool_size = 0;
for (i = 0; i < fps->fps_pool_size; i++) {
INIT_LIST_HEAD(&fpo->fast_reg.fpo_pool_list);
fpo->fast_reg.fpo_pool_size = 0;
for (i = 0; i < fps->fps_pool_size; i++) {
return;
fps = fpo->fpo_owner;
return;
fps = fpo->fpo_owner;
- if (!IS_ERR_OR_NULL(fpo->fmr.fpo_fmr_pool)) {
if (fmr->fmr_pfmr) {
rc = ib_fmr_pool_unmap(fmr->fmr_pfmr);
LASSERT(!rc);
if (fmr->fmr_pfmr) {
rc = ib_fmr_pool_unmap(fmr->fmr_pfmr);
LASSERT(!rc);
fpo->fpo_deadline = ktime_get_seconds() + IBLND_POOL_DEADLINE;
fpo->fpo_map_count++;
fpo->fpo_deadline = ktime_get_seconds() + IBLND_POOL_DEADLINE;
fpo->fpo_map_count++;
- if (!IS_ERR_OR_NULL(fpo->fmr.fpo_fmr_pool)) {
struct ib_pool_fmr *pfmr;
spin_unlock(&fps->fps_lock);
struct ib_pool_fmr *pfmr;
spin_unlock(&fps->fps_lock);
time64_t fpo_deadline; /* deadline of this pool */
int fpo_failed; /* fmr pool is failed */
int fpo_map_count; /* # of mapped FMR */
time64_t fpo_deadline; /* deadline of this pool */
int fpo_failed; /* fmr pool is failed */
int fpo_map_count; /* # of mapped FMR */
+ bool fpo_is_fmr; /* True if FMR pools allocated */