target/rd: Refactor rd_build_device_space + rd_release_device_space
authorNicholas Bellinger <nab@linux-iscsi.org>
Tue, 7 Jan 2014 22:40:27 +0000 (22:40 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 19 Jan 2014 02:22:05 +0000 (02:22 +0000)
commit4442dc8a92b8f9ad8ee9e7f8438f4c04c03a22dc
treeb671256303a49d3e4a6d104f611b6f9ce766377a
parent42201b557471f2fef2e9e028b50a773d99ffc401
target/rd: Refactor rd_build_device_space + rd_release_device_space

This patch refactors rd_build_device_space() + rd_release_device_space()
into rd_allocate_sgl_table() + rd_release_device_space() so that they
may be used seperatly for setup + release of protection information
scatterlists.

Also add explicit memset of pages within rd_allocate_sgl_table() based
upon passed 'init_payload' value.

v2 changes:
  - Drop unused sg_table from rd_release_device_space (Wei)

Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_rd.c