]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] scsi_debug: prohibit scsi_debug_unmap_granularity == scsi_debug_unmap_alignment
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 16 Apr 2013 13:11:56 +0000 (22:11 +0900)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 2 May 2013 22:39:54 +0000 (15:39 -0700)
commit928a304c97adb72b6cc41f6621b9f247f10ff5f6
treee2909e1b328f57de1e2fbd7eb2b47a1723e54bae
parenta77e6d60bc531de9956734515eb042e2c63b2af6
[SCSI] scsi_debug: prohibit scsi_debug_unmap_granularity == scsi_debug_unmap_alignment

scsi_debug prohibits setting scsi_debug_unmap_alignment to be greater
than scsi_debug_unmap_granularity.  But setting them to be the same value
is not prohibited.  In this case, the only difference with
scsi_debug_unmap_alignment == 0 is the logical blocks from 0 to
scsi_debug_unmap_alignment - 1 cannot be unmapped.  But the difference is
not properly handled in the current code.

So this prohibits such unusual setting.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_debug.c