scsi: target: core: Send max transfer length in blocks
authorAnastasia Kovaleva <a.kovaleva@yadro.com>
Mon, 14 Nov 2022 10:24:58 +0000 (13:24 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 24 Nov 2022 02:16:19 +0000 (02:16 +0000)
commit7870d24817890bccee98db0718acececd6399d04
treebf71aa545dd5c96450f3b7c0a6f63ada1ca82c45
parentcdd9344e00b4fe3a4683a0ee58826c7a5ce778e0
scsi: target: core: Send max transfer length in blocks

A MAXIMUM TRANSFER LENGTH value indicates the maximum transfer length in
logical blocks that the device server accepts for a single command. Fix
function sending the length in sectors instead of blocks.

This patch also removes the special casing for fileio in block_size_store
since this logic in now unified in spc_emulate_evpd_b0() for all backends.

Reviewed-by: Konstantin Shelekhin <k.shelekhin@yadro.com>
Reviewed-by: Dmitriy Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Anastasia Kovaleva <a.kovaleva@yadro.com>
Link: https://lore.kernel.org/r/20221114102500.88892-2-a.kovaleva@yadro.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_configfs.c
drivers/target/target_core_file.c
drivers/target/target_core_spc.c
include/target/target_core_base.h