diff options
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 99a72c650728..6b734461fd39 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -2210,12 +2210,12 @@ static int blk_mq_init_hctx(struct request_queue *q, | |||
2210 | * runtime | 2210 | * runtime |
2211 | */ | 2211 | */ |
2212 | hctx->ctxs = kmalloc_array_node(nr_cpu_ids, sizeof(void *), | 2212 | hctx->ctxs = kmalloc_array_node(nr_cpu_ids, sizeof(void *), |
2213 | GFP_KERNEL, node); | 2213 | GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY, node); |
2214 | if (!hctx->ctxs) | 2214 | if (!hctx->ctxs) |
2215 | goto unregister_cpu_notifier; | 2215 | goto unregister_cpu_notifier; |
2216 | 2216 | ||
2217 | if (sbitmap_init_node(&hctx->ctx_map, nr_cpu_ids, ilog2(8), GFP_KERNEL, | 2217 | if (sbitmap_init_node(&hctx->ctx_map, nr_cpu_ids, ilog2(8), |
2218 | node)) | 2218 | GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY, node)) |
2219 | goto free_ctxs; | 2219 | goto free_ctxs; |
2220 | 2220 | ||
2221 | hctx->nr_ctx = 0; | 2221 | hctx->nr_ctx = 0; |
@@ -2228,7 +2228,8 @@ static int blk_mq_init_hctx(struct request_queue *q, | |||
2228 | set->ops->init_hctx(hctx, set->driver_data, hctx_idx)) | 2228 | set->ops->init_hctx(hctx, set->driver_data, hctx_idx)) |
2229 | goto free_bitmap; | 2229 | goto free_bitmap; |
2230 | 2230 | ||
2231 | hctx->fq = blk_alloc_flush_queue(q, hctx->numa_node, set->cmd_size); | 2231 | hctx->fq = blk_alloc_flush_queue(q, hctx->numa_node, set->cmd_size, |
2232 | GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY); | ||
2232 | if (!hctx->fq) | 2233 | if (!hctx->fq) |
2233 | goto exit_hctx; | 2234 | goto exit_hctx; |
2234 | 2235 | ||
@@ -2536,12 +2537,14 @@ static void blk_mq_realloc_hw_ctxs(struct blk_mq_tag_set *set, | |||
2536 | 2537 | ||
2537 | node = blk_mq_hw_queue_to_node(q->mq_map, i); | 2538 | node = blk_mq_hw_queue_to_node(q->mq_map, i); |
2538 | hctxs[i] = kzalloc_node(blk_mq_hw_ctx_size(set), | 2539 | hctxs[i] = kzalloc_node(blk_mq_hw_ctx_size(set), |
2539 | GFP_KERNEL, node); | 2540 | GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY, |
2541 | node); | ||
2540 | if (!hctxs[i]) | 2542 | if (!hctxs[i]) |
2541 | break; | 2543 | break; |
2542 | 2544 | ||
2543 | if (!zalloc_cpumask_var_node(&hctxs[i]->cpumask, GFP_KERNEL, | 2545 | if (!zalloc_cpumask_var_node(&hctxs[i]->cpumask, |
2544 | node)) { | 2546 | GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY, |
2547 | node)) { | ||
2545 | kfree(hctxs[i]); | 2548 | kfree(hctxs[i]); |
2546 | hctxs[i] = NULL; | 2549 | hctxs[i] = NULL; |
2547 | break; | 2550 | break; |