vhost/scsi: increase VHOST_SCSI_PREALLOC_PROT_SGLS to 2048
Michael S. Tsirkin
maintainerQuoted 18 lines · Greg Edwards
The current value of
VHOST_SCSI_PREALLOC_PROT_SGLSis too small to accommodate larger I/Os, e.g. 16-32 MiB, when theVIRTIO_SCSI_F_T10_PIfeature bit is negotiated and the backing store supports T10 PI.vhost-scsi rejects the command with errors like:
[ 59.581317] vhost_scsi_calc_sgls: requested sgl_count: 1820 exceeds pre-allocated max_sgls: 512Signed-off-by Greg Edwards <[email protected]>--- drivers/vhost/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/vhost/scsi.c +0
-0
drivers/vhost/scsi.c line 62
Quoted 8 lines
drivers/vhost/scsi.c +1
-1@@ -56,7 +56,7 @@#define VHOST_SCSI_DEFAULT_TAGS 256#define VHOST_SCSI_PREALLOC_SGLS 2048#define VHOST_SCSI_PREALLOC_UPAGES 2048 -#define VHOST_SCSI_PREALLOC_PROT_SGLS 512 +#define VHOST_SCSI_PREALLOC_PROT_SGLS 2048struct vhost_scsi_inflight {/* Wait for the flush operation to finish */
I guess it's ok since PREALLOC_SGLS is already 2K ... or am I missing something. Paolo, any input on this?
Quoted 2 lines
Signature · 1 line
2.17.1
Quoted 25 lines · Michael S. Tsirkin
Quoted 24 lines · Greg Edwards
The current value of
VHOST_SCSI_PREALLOC_PROT_SGLSis too small to accommodate larger I/Os, e.g. 16-32 MiB, when theVIRTIO_SCSI_F_T10_PIfeature bit is negotiated and the backing store supports T10 PI.vhost-scsi rejects the command with errors like:
[ 59.581317] vhost_scsi_calc_sgls: requested sgl_count: 1820 exceeds pre-allocated max_sgls: 512Signed-off-by Greg Edwards <[email protected]>--- drivers/vhost/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/vhost/scsi.c +1
-1@@ -56,7 +56,7 @@#define VHOST_SCSI_DEFAULT_TAGS 256#define VHOST_SCSI_PREALLOC_SGLS 2048#define VHOST_SCSI_PREALLOC_UPAGES 2048 -#define VHOST_SCSI_PREALLOC_PROT_SGLS 512 +#define VHOST_SCSI_PREALLOC_PROT_SGLS 2048
Quoted 5 lines
drivers/vhost/scsi.c line 62
Quoted 2 lines
drivers/vhost/scsi.c +0
-0struct vhost_scsi_inflight {/* Wait for the flush operation to finish */ I guess it's ok since
PREALLOC_SGLSis already 2K ... or am I missing something. Paolo, any input on this?
Ignore this patch. I believe I've identified the root cause [1], and will send out a new patch once I've done some more testing.
Greg