]> git.baikalelectronics.ru Git - kernel.git/commit
target: Add/check max_write_same_len device attribute + update block limits VPD
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 15 Nov 2012 19:02:49 +0000 (11:02 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 15 Nov 2012 20:27:21 +0000 (12:27 -0800)
commitc4b354205b814c8318e950066de4f964c87d9d2b
tree91e6015ade8d62c34c64861f1f3810b3c15a6a25
parent30a48ac52680d6d477374c4d4ea5d61293979f45
target: Add/check max_write_same_len device attribute + update block limits VPD

This patch adds a new max_write_same_len device attribute for use with
WRITE_SAME w/ UNMAP=0 backend emulation.  This can be useful for
lowering the default backend value (IBLOCK uses 0xFFFF).

Also, update block limits VPD emulation code in spc_emulate_evpd_b0() to
report MAXIMUM WRITE SAME LENGTH, and enforce max_write_same_len during
sbc_parse() -> sbc_setup_write_same() CDB sanity checking for all emulated
WRITE_SAME w/ UNMAP=0 cases.

(Robert: Move max_write_same_len check in sbc_setup_write_same() to
         check both WRITE_SAME w/ UNMAP=1 and w/ UNMAP=0 cases)

Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Robert Elliott <Elliott@hp.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_configfs.c
drivers/target/target_core_device.c
drivers/target/target_core_internal.h
drivers/target/target_core_sbc.c
drivers/target/target_core_spc.c
include/target/target_core_base.h