Max_sectors related error made more clear

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2725 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2010-11-17 12:48:21 +00:00
parent 52820b5d57
commit 30e14c9e7c
3 changed files with 19 additions and 10 deletions

View File

@@ -1241,11 +1241,12 @@ As any other hardware, the local SCSI hardware can not handle commands
with amount of data and/or segments count in scatter-gather array bigger
some values. Therefore, when using the pass-through mode you should note
that values for maximum number of segments and maximum amount of
transferred data for each SCSI command on devices on initiators can not
be bigger, than corresponding values of the corresponding SCSI devices
on the target. Otherwise you will see symptoms like small transfers work
well, but large ones stall and messages like: "Unable to complete
command due to SG IO count limitation" are printed in the kernel logs.
transferred data (max_sectors) for each SCSI command on devices on
initiators can not be bigger, than corresponding values of the
corresponding SCSI devices on the target. Otherwise you will see
symptoms like small transfers work well, but large ones stall and
messages like: "Unable to complete command due to SG IO count
limitation" are printed in the kernel logs.
You can't control from the user space limit of the scatter-gather
segments, but for block devices usually it is sufficient if you set on

View File

@@ -1094,11 +1094,12 @@ As any other hardware, the local SCSI hardware can not handle commands
with amount of data and/or segments count in scatter-gather array bigger
some values. Therefore, when using the pass-through mode you should note
that values for maximum number of segments and maximum amount of
transferred data for each SCSI command on devices on initiators can not
be bigger, than corresponding values of the corresponding SCSI devices
on the target. Otherwise you will see symptoms like small transfers work
well, but large ones stall and messages like: "Unable to complete
command due to SG IO count limitation" are printed in the kernel logs.
transferred data (max_sectors) for each SCSI command on devices on
initiators can not be bigger, than corresponding values of the
corresponding SCSI devices on the target. Otherwise you will see
symptoms like small transfers work well, but large ones stall and
messages like: "Unable to complete command due to SG IO count
limitation" are printed in the kernel logs.
You can't control from the user space limit of the scatter-gather
segments, but for block devices usually it is sufficient if you set on

View File

@@ -2500,6 +2500,13 @@ static int scst_do_real_exec(struct scst_cmd *cmd)
#endif
if (unlikely(rc != 0)) {
PRINT_ERROR("scst pass-through exec failed: %x", rc);
if ((int)rc == -EINVAL)
PRINT_ERROR("Do you have too low max_sectors on your "
"backend hardware? For success max_sectors must "
"be >= bufflen in sectors (max_sectors %d, "
"bufflen %db, CDB %x). See README for more "
"details.", dev->scsi_dev->host->max_sectors,
cmd->bufflen, cmd->cdb[0]);
goto out_error;
}