diff options
Diffstat (limited to 'drivers/target/target_core_file.c')
| -rw-r--r-- | drivers/target/target_core_file.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index c2aea099ea4a..d836de200a03 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c | |||
| @@ -621,7 +621,16 @@ fd_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, | |||
| 621 | struct fd_prot fd_prot; | 621 | struct fd_prot fd_prot; |
| 622 | sense_reason_t rc; | 622 | sense_reason_t rc; |
| 623 | int ret = 0; | 623 | int ret = 0; |
| 624 | 624 | /* | |
| 625 | * We are currently limited by the number of iovecs (2048) per | ||
| 626 | * single vfs_[writev,readv] call. | ||
| 627 | */ | ||
| 628 | if (cmd->data_length > FD_MAX_BYTES) { | ||
| 629 | pr_err("FILEIO: Not able to process I/O of %u bytes due to" | ||
| 630 | "FD_MAX_BYTES: %u iovec count limitiation\n", | ||
| 631 | cmd->data_length, FD_MAX_BYTES); | ||
| 632 | return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; | ||
| 633 | } | ||
| 625 | /* | 634 | /* |
| 626 | * Call vectorized fileio functions to map struct scatterlist | 635 | * Call vectorized fileio functions to map struct scatterlist |
| 627 | * physical memory addresses to struct iovec virtual memory. | 636 | * physical memory addresses to struct iovec virtual memory. |
| @@ -959,7 +968,6 @@ static struct configfs_attribute *fileio_backend_dev_attrs[] = { | |||
| 959 | &fileio_dev_attrib_hw_block_size.attr, | 968 | &fileio_dev_attrib_hw_block_size.attr, |
| 960 | &fileio_dev_attrib_block_size.attr, | 969 | &fileio_dev_attrib_block_size.attr, |
| 961 | &fileio_dev_attrib_hw_max_sectors.attr, | 970 | &fileio_dev_attrib_hw_max_sectors.attr, |
| 962 | &fileio_dev_attrib_fabric_max_sectors.attr, | ||
| 963 | &fileio_dev_attrib_optimal_sectors.attr, | 971 | &fileio_dev_attrib_optimal_sectors.attr, |
| 964 | &fileio_dev_attrib_hw_queue_depth.attr, | 972 | &fileio_dev_attrib_hw_queue_depth.attr, |
| 965 | &fileio_dev_attrib_queue_depth.attr, | 973 | &fileio_dev_attrib_queue_depth.attr, |
