target/rd: T10-Dif: RAM disk is allocating more space than required.
authorQuinn Tran <quinn.tran@qlogic.com>
Fri, 28 Mar 2014 23:05:27 +0000 (19:05 -0400)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 7 Apr 2014 08:48:53 +0000 (01:48 -0700)
commit9d2e59f2a778328a41771fe9a0098dadbc4314ba
tree3a921494b5de360dda42f639bab92cdc03d427e1
parentd444edc679e7713412f243b792b1f964e5cff1e1
target/rd: T10-Dif: RAM disk is allocating more space than required.

Ram disk is allocating 8x more space than required for diff data.
For large RAM disk test, there is small potential for memory
starvation.

(Use block_size when calculating total_sg_needed - sagi + nab)

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Cc: <stable@vger.kernel.org> #3.14+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_rd.c