Fix the argument of the second kunmap() call. Detected by smatch.
See also patch "scst_lib: Improve WRITE SAME performance" (commit
ID a15628d683). Note: this patch does not have any impact on
64-bit architectures since kunmap() doesn't to anything on such
architectures.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Add instructions for how to download and install the 16 Gb/s FC HBA
driver. Remove the "optional step" since this step should not be
needed after various recent fixes in the SCST makefiles. Recommend
to blacklist the distro QLA initiator driver even if the kernel is
not being rebuilt.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Some storage devices have a block size of 512 bytes and a minimum
I/O size and/or optimal I/O size of 4096 bytes. Improve WRITE SAME
performance for such devices by increasing the I/O granularity from
512 bytes to 4096 bytes.
Based on a patch written by Vishal Tripathi <vishal.tripathi@calsoftinc.com>
and Sushil Sharma <sushil.sharma@calsoftinc.com>.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
+ with some minor changes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6189 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that unknown parameters cause __vdev_load_mode_pages() to
return 0 instead of -EINVAL. Detected by Coverity.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
The bio request type must be set before bio_add_page() is invoked.
See e.g. raid5_mergeable_bvec() for an example of a function that
checks (bi_rw & REQ_WRITE) from inside the bio_add_page() call.
This patch improves performance when using SCST on top of RAID5.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Logically and negative allowed_portal conditions instead of
or-ing these. If both positive and negative conditions match,
the negative condition takes precedence.
This was proposed by Sergej Roytman <spocks.goatee@gmail.com>.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Some storage devices have a block size of 512 bytes and a minimum
I/O size and/or optimal I/O size of 4096 bytes. Improve WRITE SAME
performance for such devices by increasing the I/O granularity from
512 bytes to 4096 bytes.
Based on a patch written by Vishal Tripathi <vishal.tripathi@calsoftinc.com>
and Sushil Sharma <sushil.sharma@calsoftinc.com>.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
The scst_block_generic_dev_done() function parses the READ CAPACITY
response. Add support for parsing the READ CAPACITY(16) response.
Additionally, add a check whether the response buffer is big enough
to hold the sector size.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
The scst_block_generic_dev_done() function parses the READ CAPACITY
response without checking whether the response buffer contains
valid data. This can lead to incorrect block size changes and also
to the following kernel warning:
WARNING: at scst/src/scst_lib.c:7353 scst_calc_block_shift+0x7f/0xb0 [scst]()
1 << 23 != 12595456
[<ffffffff816071e3>] dump_stack+0x19/0x1b
[<ffffffff8106e23d>] warn_slowpath_common+0x7d/0xc0
[<ffffffff8106e336>] warn_slowpath_fmt+0x46/0x50
[<ffffffffa0712e2f>] scst_calc_block_shift+0x7f/0xb0 [scst]
[<ffffffffa072dbd7>] scst_block_generic_dev_done.part.39+0x6a/0x7d [scst]
[<ffffffffa07162a4>] scst_block_generic_dev_done+0x34/0x40 [scst]
[<ffffffffa0066205>] dev_user_disk_done+0x15/0x20 [scst_user]
[<ffffffffa070c119>] scst_dev_done+0x49/0x150 [scst]
[<ffffffffa070e1a0>] scst_process_active_cmd+0x240/0x390 [scst]
[<ffffffffa070e7e1>] scst_process_redirect_cmd+0x121/0x1e0 [scst]
[<ffffffffa070e916>] scst_cmd_done_local+0x76/0x120 [scst]
[<ffffffffa006843a>] dev_user_process_reply_exec+0x8a/0x370 [scst_user]
[<ffffffffa00699e2>] dev_user_process_reply+0x242/0x2e0 [scst_user]
[<ffffffffa0069b80>] dev_user_reply_get_cmd.isra.17+0x100/0x2d0 [scst_user]
[<ffffffffa0069ea7>] dev_user_ioctl+0x157/0x428 [scst_user]
[<ffffffff811d999a>] do_vfs_ioctl+0x7a/0x2e0
[<ffffffff811d9c91>] SyS_ioctl+0x91/0xb0
[<ffffffff8161b269>] system_call_fastpath+0x16/0x1b
Avoid this by calling dev_done() handlers only for completed commands
and not for aborted commands.
Reported-by: Gal Rosen <galr@storone.com>
Reported-by: Abacus Liang <abacusl@hotmail.com>
Reported-by: Shahar Salzman <shahar.salzman@kaminario.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Remove the comment blocks from scst_block_generic_dev_done()
and scst_tape_generic_dev_done() since that comment does
not apply to these functions. Remove the trace statement from
scst_block_generic_dev_done() since it prints values that
are not modified by this function.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Some but not all SCSI LLD drivers set req->errors. Some SCSI
LLD drivers set req->errors to a negative Unix error code and
others assign the result of make_status_bytes() to req->errors.
The SCSI core finishes failed pass-through requests by calling
blk_finish_request(). That function calls req->end_io() without
setting req->errors. Hence check both the error argument and
req->errors before calling sioc->done().
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Make the ib_srpt driver build again on RHEL 5 systems. See also
r6138 / commit ID 940faa9ad4.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>