-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle_writesame_check: Illegal Data-Out: iov_cnt 2 length: 63 error #476
Comments
I think we just never saw a command like that, thought it was not possible and did not code handle_writesame to handle it. It seems valid. What LIO fabric driver are you using? Are you using the passthrough ws code path or the emulated in tcmur_cmd_handler.c:handle_writesame() code path? For the latter it looks like the loop and related code needs to be fixed up:
|
I am using the LIO loopback fabric, with an ext4 file system mounted on the block device with a DB back store.
I believe it is coming in via the tcmur_cmd_handler() call to handle_writesame() on a WRITE_SAME SCSI command. |
It seems a possible reason for the iov_cnt being 2 is that the IO transfer has crossed a page boundary and some code that has mapped kernel virtual to user virtual has decided to split the transfer??? But that's a guess. Dumping out the iov_base + iov_len always seems to coincide to a page boundary. |
Do you need me to work on a patch or were you going to? I am busy at work this week. I will look into next week. |
If you can provide a patch, that would be welcome. I am not in an immediate hurry, but will try to workaround the issue, if I can. |
I have written a tcmu-runner plugin and I am being occasionally see these error messages ,
handle_writesame_check: ... Illegal Data-Out: iov_cnt 2 length: 63 in the tcmu-runner error log.
I think the test in the function_writesame_check maybe broken
...
if (cmd->iov_cnt != 1 || cmd->iovec->iov_len != block_size) {
I have added some extra debug and although iov_cnt is 2, the sum of the iov_len is 512 (63 & 449), albeit inefficient. I don't know why the SCSI has split the IO command like this, but surely the iovec is valid????
The text was updated successfully, but these errors were encountered: