Commit 670caa9f authored by Andy Grover's avatar Andy Grover Committed by Nicholas Bellinger

target: Don't allocate pages for NULLIO devices

Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent db5d1c3c
......@@ -139,6 +139,11 @@ static int rd_build_device_space(struct rd_dev *rd_dev)
rd_dev->rd_page_count);
return -EINVAL;
}
/* Don't need backing pages for NULLIO */
if (rd_dev->rd_flags & RDF_NULLIO)
return 0;
total_sg_needed = rd_dev->rd_page_count;
sg_tables = (total_sg_needed / max_sg_per_table) + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment