- 14 Feb, 2015 1 commit
-
-
Tejun Heo authored
printk and friends can now format bitmaps using '%*pb[l]'. cpumask and nodemask also provide cpumask_pr_args() and nodemask_pr_args() respectively which can be used to generate the two printf arguments necessary to format the specified cpu/nodemask. * map_show()'s return value is too high by one and the function could modify beyond the end of the buffer when the formatted text is long enough. Signed-off-by:
Tejun Heo <tj@kernel.org> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 22 Jan, 2015 1 commit
-
-
Colin Ian King authored
cppcheck found the following issue: (warning) Logical conjunction always evaluates to false: alloc_len < 4 && alloc_len > 65535. ..the test should be instead: if (alloc_len < 4 || alloc_len > 65536) This error was introduced by recent commit 38d5c833 ("scsi_debug: add Report supported opcodes+tmfs; Compare and write") Signed-off-by:
Colin Ian King <colin.king@canonical.com> Acked-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 20 Jan, 2015 1 commit
-
-
Sasha Levin authored
resp_rsup_opcodes() may get called from atomic context and would need to use GFP_ATOMIC for allocations: [ 1237.913419] BUG: sleeping function called from invalid context at mm/slub.c:1262 [ 1237.914865] in_atomic(): 1, irqs_disabled(): 0, pid: 7556, name: trinity-c311 [ 1237.916142] 3 locks held by trinity-c311/7556: [ 1237.916981] #0: (sb_writers#5){.+.+.+}, at: do_readv_writev (include/linux/fs.h:2346 fs/read_write.c:844) [ 1237.919713] #1: (&of->mutex){+.+.+.}, at: kernfs_fop_write (fs/kernfs/file.c:297) [ 1237.922626] Mutex: counter: -1 owner: trinity-c311 [ 1237.924044] #2: (s_active#51){.+.+.+}, at: kernfs_fop_write (fs/kernfs/file.c:297) [ 1237.925960] Preemption disabled blk_execute_rq_nowait (block/blk-exec.c:95) [ 1237.927416] [ 1237.927680] CPU: 24 PID: 7556 Comm: trinity-c311 Not tainted 3.19.0-rc4-next-20150116-sasha-00054-g4ad498c-dirty #1744 [ 1237.929603] ffff8804fc9d8000 ffff8804d9bc3548 ffffffff9d439fb2 0000000000000000 [ 1237.931097] 0000000000000000 ffff8804d9bc3588 ffffffff9a18389a ffff8804d9bc3598 [ 1237.932466] ffffffff9a1b1715 ffffffffa15935d8 ffffffff9e6f8cb1 00000000000004ee [ 1237.933984] Call Trace: [ 1237.934434] dump_stack (lib/dump_stack.c:52) [ 1237.935323] ___might_sleep (kernel/sched/core.c:7339) [ 1237.936259] ? mark_held_locks (kernel/locking/lockdep.c:2549) [ 1237.937293] __might_sleep (kernel/sched/core.c:7305) [ 1237.938272] __kmalloc (mm/slub.c:1262 mm/slub.c:2419 mm/slub.c:2491 mm/slub.c:3291) [ 1237.939137] ? resp_rsup_opcodes (include/linux/slab.h:435 drivers/scsi/scsi_debug.c:1689) [ 1237.940173] resp_rsup_opcodes (include/linux/slab.h:435 drivers/scsi/scsi_debug.c:1689) [ 1237.941211] ? add_host_store (drivers/scsi/scsi_debug.c:1584) [ 1237.942261] scsi_debug_queuecommand (drivers/scsi/scsi_debug.c:5276) [ 1237.943404] ? blk_rq_map_sg (block/blk-merge.c:254) [ 1237.944398] ? scsi_init_sgtable (drivers/scsi/scsi_lib.c:1095) [ 1237.945402] sdebug_queuecommand_lock_or_not (drivers/scsi/scsi_debug.c:5300) [ 1237.946735] scsi_dispatch_cmd (drivers/scsi/scsi_lib.c:1706) [ 1237.947720] scsi_queue_rq (drivers/scsi/scsi_lib.c:1996) [ 1237.948687] __blk_mq_run_hw_queue (block/blk-mq.c:816) [ 1237.949796] blk_mq_run_hw_queue (block/blk-mq.c:896) [ 1237.950903] ? _raw_spin_unlock (./arch/x86/include/asm/preempt.h:95 include/linux/spinlock_api_smp.h:154 kernel/locking/spinlock.c:183) [ 1237.951862] blk_mq_insert_request (block/blk-mq.c:1037) [ 1237.952876] blk_execute_rq_nowait (block/blk-exec.c:95) [ 1237.953981] ? lockdep_init_map (kernel/locking/lockdep.c:3034) [ 1237.954967] blk_execute_rq (block/blk-exec.c:131) [ 1237.955929] ? blk_rq_bio_prep (block/blk-core.c:2835) [ 1237.956913] scsi_execute (drivers/scsi/scsi_lib.c:252) [ 1237.957821] scsi_execute_req_flags (drivers/scsi/scsi_lib.c:281) [ 1237.958968] scsi_report_opcode (drivers/scsi/scsi.c:956) [ 1237.960009] sd_revalidate_disk (drivers/scsi/sd.c:2707 drivers/scsi/sd.c:2792) [ 1237.961139] revalidate_disk (fs/block_dev.c:1081) [ 1237.962223] sd_rescan (drivers/scsi/sd.c:1532) [ 1237.963142] scsi_rescan_device (drivers/scsi/scsi_scan.c:1579) [ 1237.964165] store_rescan_field (drivers/scsi/scsi_sysfs.c:672) [ 1237.965254] dev_attr_store (drivers/base/core.c:138) [ 1237.966319] sysfs_kf_write (fs/sysfs/file.c:131) [ 1237.967289] kernfs_fop_write (fs/kernfs/file.c:311) [ 1237.968274] do_readv_writev (fs/read_write.c:722 fs/read_write.c:854) [ 1237.969295] ? __acct_update_integrals (kernel/tsacct.c:145) [ 1237.970452] ? kernfs_fop_open (fs/kernfs/file.c:271) [ 1237.971505] ? _raw_spin_unlock (./arch/x86/include/asm/preempt.h:95 include/linux/spinlock_api_smp.h:154 kernel/locking/spinlock.c:183) [ 1237.972512] ? context_tracking_user_exit (include/linux/vtime.h:89 include/linux/jump_label.h:114 include/trace/events/context_tracking.h:47 kernel/context_tracking.c:140) [ 1237.973668] ? trace_hardirqs_on_caller (kernel/locking/lockdep.c:2578 kernel/locking/lockdep.c:2625) [ 1237.974882] ? trace_hardirqs_on (kernel/locking/lockdep.c:2633) [ 1237.975850] vfs_writev (fs/read_write.c:893) [ 1237.976691] SyS_writev (fs/read_write.c:926 fs/read_write.c:917) [ 1237.977538] system_call_fastpath (arch/x86/kernel/entry_64.S:423) Signed-off-by:
Sasha Levin <sasha.levin@oracle.com> Acked-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 09 Jan, 2015 2 commits
-
-
Ewan D. Milne authored
Accept the WRITE BUFFER command and do nothing other than set the appropriate "microcode has been changed" UA on the LU. >From an earlier patch by Doug Gilbert. Signed-off-by:
Ewan D. Milne <emilne@redhat.com> Acked-by:
Douglas Gilbert <dgilbert@interlog.com> Tested-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Ewan D. Milne authored
Generate a REPORTED LUNS DATA HAS CHANGED Unit Attention if sysfs "max_luns" is used to change the number of scsi_debug LUNs. This is only done if scsi_debug_scsi_level is SPC-3 or above. Additionally, implement SPC-4 behavior which only generates this Unit Attention on the first LUN on the target to receive a command after the change. This condition is cleared when a REPORT LUNS command is received. Signed-off-by:
Ewan D. Milne <emilne@redhat.com> Acked-by:
Douglas Gilbert <dgilbert@interlog.com> Tested-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 15 Dec, 2014 3 commits
-
-
Ewan D. Milne authored
This eliminates a superfluous log message when the capacity is changed: "check_readiness: unexpected unit attention code=3" Signed-off-by:
Ewan D. Milne <emilne@redhat.com> Acked-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Ewan D. Milne authored
All other traversals of the sdebug_host_list take the lock. Signed-off-by:
Ewan D. Milne <emilne@redhat.com> Acked-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Douglas Gilbert authored
Kernel build tools pointed out a memory leak so that has been fixed and its error paths strengthened with a goto. Testing showed compare and write was only working for lba=0; correcting the length of the LBA field fixed that. Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Ewan D. Milne <emilne@redhat.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 04 Dec, 2014 2 commits
-
-
Christoph Hellwig authored
For SPI drivers use the message definitions from scsi.h, and for target drivers introduce a new TCM_*_TAG namespace. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Christoph Hellwig authored
Since we got rid of ordered tag support in 2010 the prime use case of switching on and off ordered tags has been obsolete. The other function of enabling/disabling tagging entirely has only been correctly implemented by the 53c700 driver and isn't generally useful. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by:
Hannes Reinecke <hare@suse.de>
-
- 25 Nov, 2014 5 commits
-
-
Douglas Gilbert authored
The Report supported operation codes command is very closely integrated into the table driven parser and very useful for testing it. Its cdb masks form the basis of the 'strict' parameter's checks. The Report supported TMFs command is a simple extension. The Compare and write command may even be useful, as it should be atomic due to the read-write lock that the driver uses on its backing store (ram). Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Douglas Gilbert authored
The existing 'big switch' parser in queuecommand() is changed to a table driven parser. The old and new queuecommand() were moved in the source so diff would not shuffle them. Apart from the new tables most other changes are refactoring existing response code to be more easily called out of the table parser. The 'strict' parameter is added so that cdb_s can be checked for non-zero values in parts of the cdb that are reserved. Some other changes include: tweak request sense response when D_SENSE differs; support NDOB in Write Same(16); and fix crash in Get LBA Status when LBP was inactive. Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Douglas Gilbert authored
Via sysfs the virtual_gb scsi_debug parameter can be changed while LUs are in use. If that changes, the 'Capacity data has changed' Unit Attention is queued on all LUs. Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Douglas Gilbert authored
The way the existing scsi_debug command parser associated various inject error flags to a command was difficult to replicate in the table driven parser. This patch adds infrastructure to append those flags to the end of a scsi_cmnd object with the cmd_size host template option. Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Douglas Gilbert authored
Use Sense Key Specific field in the sense data of an ILLEGAL REQUEST to optionally pinpoint the location of the problem field. This may be either in the cdb or the associated parameter list. Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 24 Nov, 2014 3 commits
-
-
Hannes Reinecke authored
SPC-3 defines SERVICE ACTION IN(12) and SERVICE ACTION IN(16). So rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to be consistent with SPC and to allow for better distinction. Signed-off-by:
Hannes Reinecke <hare@suse.de> Tested-by:
Robert Elliott <elliott@hp.com> Reviewed-by:
Robert Elliott <elliott@hp.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Christoph Hellwig authored
Drop the now unused reason argument from the ->change_queue_depth method. Also add a return value to scsi_adjust_queue_depth, and rename it to scsi_change_queue_depth now that it can be used as the default ->change_queue_depth implementation. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Mike Christie <michaelc@cs.wisc.edu> Reviewed-by:
Hannes Reinecke <hare@suse.de>
-
Christoph Hellwig authored
All drivers use the implementation for ramping the queue up and down, so instead of overloading the change_queue_depth method call the implementation diretly if the driver opts into it by setting the track_queue_depth flag in the host template. Note that a few drivers validated the new queue depth in their change_queue_depth method, but as we never go over the queue depth set during slave_configure or the sysfs file this isn't nessecary and can safely be removed. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Mike Christie <michaelc@cs.wisc.edu> Reviewed-by:
Hannes Reinecke <hare@suse.de> Reviewed-by:
Venkatesh Srinivas <venkateshs@google.com>
-
- 12 Nov, 2014 4 commits
-
-
Finn Thain authored
Signed-off-by:
Finn Thain <fthain@telegraphics.com.au> Acked-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Christoph Hellwig authored
Now that we also get proper values in cmd->request->tag for untagged commands, there is no need to force tagged_supported to on in drivers that need host-wide tags. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Mike Christie <michaelc@cs.wisc.edu> Reviewed-by:
Hannes Reinecke <hare@suse.de>
-
Christoph Hellwig authored
Remove the tagged argument from scsi_adjust_queue_depth, and just let it handle the queue depth. For most drivers those two are fairly separate, given that most modern drivers don't care about the SCSI "tagged" status of a command at all, and many old drivers allow queuing of multiple untagged commands in the driver. Instead we start out with the ->simple_tags flag set before calling ->slave_configure, which is how all drivers actually looking at ->simple_tags except for one worke anyway. The one other case looks broken, but I've kept the behavior as-is for now. Except for that we only change ->simple_tags from the ->change_queue_type, and when rejecting a tag message in a single driver, so keeping this churn out of scsi_adjust_queue_depth is a clear win. Now that the usage of scsi_adjust_queue_depth is more obvious we can also remove all the trivial instances in ->slave_alloc or ->slave_configure that just set it to the cmd_per_lun default. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Mike Christie <michaelc@cs.wisc.edu> Reviewed-by:
Hannes Reinecke <hare@suse.de> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com>
-
Christoph Hellwig authored
Most drivers use exactly the same implementation, so provide it as a library function. Signed-off-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Bart Van Assche <bvanassche@acm.org> Reviewed-by:
Mike Christie <michaelc@cs.wisc.edu> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by:
Hannes Reinecke <hare@suse.de>
-
- 14 Oct, 2014 1 commit
-
-
Rasmus Villemoes authored
The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Signed-off-by:
Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 30 Sep, 2014 1 commit
-
-
Douglas Gilbert authored
A deadlock has been reported when the completion of SCSI commands (simulated by a timer) was surprised by a module removal. This patch removes one half of the offending locks around timer deletions. This fix is applied both to stop_all_queued() which is were the deadlock was discovered and stop_queued_cmnd() which has very similar logic. This patch should be applied both to the lk 3.17 tree and Christoph's drivers-for-3.18 tree. Tested-and-reported-by:
Milan Broz <gmazyland@gmail.com> Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 16 Sep, 2014 3 commits
-
-
Douglas Gilbert authored
Since a lot of functionality from SPC-4 is supported by this driver (e.g. LBP and PI) then bump the default INQUIRY version from SPC-3 to SPC-4. Also update the INQUIRY version descriptors. Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Douglas Gilbert authored
Give existing errors priority over the generation of Task Set Full (TSF) errors. So that max_queue is not exceeded, existing errors may be sent back in the invocation thread. This is done so errors like Unit Attentions are not hidden and lost by either max_queue exceeded or real/injected TSFs. Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Douglas Gilbert authored
This patch removes a NULL check for the scsi_cmnd::cmnd pointer since many other instances in this driver and elsewhere assume it is valid. Also redundant casts to 'unsigned char *' are removed as the pointer has that type. Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 26 Jul, 2014 1 commit
-
-
Douglas Gilbert authored
- add host_lock option whose default value is 0 which removes the host_lock around all queued commands - accept delay=-1 (_hi_) or -2 which use a tasklet to invoke the scsi_done callback into the mid-layer. The default is still delay=1 which uses a timer to delay 1 jiffy - wire .change_queue_depth and .change_queue_type functions to better simulate queueing in a modern LLD - add SCSI_DEBUG_OPT_Q_NOISE (0x200) mask to only produce debug output associated with queue full, plus from .change_queue_depth and .change_queue_type functions - add SCSI_DEBUG_OPT_ALL_TSF (0x400) mask which reports all queued_arr fulls at TASK_SET_FULL, otherwise SCSI_MLQUEUE_HOST_BUSY is returned - add SCSI_DEBUG_OPT_RARE_TSF (0x800) mask which works together with the every_nth option (> 0) to count occurrences of num_in_q==queue_depth. When every_nth is reached the victim (a command) yields TASK SET FULL - clean up many debug messages. - add ndelay=<nanosecs> option that uses high resolution timers; active if > 0 and then overrides delay= option - expand Unit Attention handling: POR, BUS_RESET and MODE PARAMETERS CHANGED - support .eh_target_reset_handler and drop .bios_param - add OPT_N_WCE mask so caching page yields WCE=0 - add OPT_RESET_NOISE mask to log aborts and resets - add OPT_NO_CDB_NOISE mask to not log each cdb - MODE SELECT support for changing caching page's WCE - name common ioctls in log - when fake_rw=1, do not vmalloc fake store; make UNMAP and WRITE SAME obey fake_rw - more logging and code improvements including better sense buffer handling With fio and four (pseudo) devices I have observed 1.2 M IOPS on my equipment. Rob Elliott who has done much testing and made numerous suggestions, has better IOPS results than mine. Signed-off-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Robert Elliott <elliott@hp.com> Tested-by:
Robert Elliott <elliott@hp.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 17 Jul, 2014 2 commits
-
-
Hannes Reinecke authored
The SCSI standard defines 64-bit values for LUNs, and large arrays employing large or hierarchical LUN numbers become more and more common. So update the linux SCSI stack to use 64-bit LUN numbers. Signed-off-by:
Hannes Reinecke <hare@suse.de> Reviewed-by:
Christoph Hellwig <hch@infradead.org> Reviewed-by:
Ewan Milne <emilne@redhat.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Akinobu Mita authored
This change enables to test read/write commands with huge transfer length such as 1GB. For example: # modprobe scsi_debug dev_size_mb=1024 clustering=1 opts=1 # cat /sys/block/$DEV/queue/max_hw_sectors_kb > \ /sys/block/$DEV/queue/max_sectors_kb # fio --name=test --rw=write --bs=1g --size=1g --filename=/dev/$DEV \ --mem=mmaphuge --direct=1 The data type of max_sectors in scsi_host_template has been extended to unsigned int by the previous change. So we can increase it from 0xffff to 0xffffffff to allow such huge transfer length. Also, this increases sg_tablesize and max_segment_size, otherwise the maximum transfer length is limited to 64MB. (sg_tablesize * max_segment_size = 256 * 256KB) Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Acked by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
- 19 May, 2014 1 commit
-
-
Christoph Hellwig authored
Add an option to only transfer half the data for every n-th command. Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Nicholas Bellinger <nab@linux-iscsi.org>
-
- 19 Mar, 2014 7 commits
-
-
Akinobu Mita authored
This adds a module parameter to enable clustering. Without enabling clustering support, the transfer length for read and write scsi commands is limited upto 8MB when page size is 4KB and sg_tablesize is 2048 (= SCSI_MAX_SG_CHAIN_SEGMENTS). I would like to test commands with more than that transfer length. Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
This change ensures that concurrent device access including ramdisk storage, protection info, and provisioning map by read, write, and unmap commands are protected with atomic_rw spinlock. Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
Currently, clustering support for scsi_debug is disabled. This is because there are for_each_sg() loops which assume that each sg list element is consisted with a single page. But enabling clustering support, each sg list element for scsi commands can be consisted with multiple pages. This replaces these for_each_sg() loops with sg mapping iterator which is capable of handling each sg list element is consisted with multiple pages. Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
When resp_xdwriteread() can't allocate temporary buffer, it returns -1. But the return value is used as scsi status code and -1 is not interpreted as correct code. target_core_mod has similar xdwriteread emulation code. So this mimics what target_core_mod does for xdwriteread when running out of memory. Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
It is unnecessary to increase dif_errors in dif_verify(), because the caller will increment it when dif_verify() detects failure. This bug was introduced by commit beb40ea4 ("[SCSI] scsi_debug: reduce duplication between prot_verify_read and prot_verify_write") Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Acked-by:
Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
As pseudo_primary is only used in scsi_debug.c, it should be static. Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by:
Douglas Gilbert <dgilbert@interlog.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
Akinobu Mita authored
Reading partially unwritten sectors generates a false positive logical block reference tag check failure when DIF is enabled. This bug is caused by missing ei_lba increment in loop of dif_verify() when unwritten sector is skipped. Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Acked-by:
Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- 16 Dec, 2013 1 commit
-
-
Akinobu Mita authored
Instead of repeatedly calling driver_create_file() to create driver attribute files, This achieves the same thing by constructing an array of driver_attribute and setting it to bus_type->drv_groups. This change simplifies both creation and destruction of the attribute files, and also removes sparse warning caused by driver_attributes which are unnecessarily declared as global. Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Acked-by:
Douglas Gilbert <dgilbert@interlog.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-
- 25 Oct, 2013 1 commit
-
-
Akinobu Mita authored
Each member in data integrity field tuple is big-endian. But the endianness of the values being compared with these members are not annotated. So this fixes these sparse warnings. Reported-by:
kbuild test robot <fengguang.wu@intel.com> Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Acked-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
-