10 Nov, 2018
1 commit
-
Remove the last use of the old BLKPREP_* values, which get converted
to BLK_STS_* later anyway.Reviewed-by: Johannes Thumshirn
Reviewed-by: Bart Van Assche
Signed-off-by: Christoph Hellwig
Signed-off-by: Jens Axboe
04 Apr, 2018
1 commit
-
Somewhat nasty merge due to conflicts between "33b28357dd00 scsi:
qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan" and "2b5b96473efc
scsi: qla2xxx: Fix FC-NVMe LUN discovery"Merge is non-trivial and has been verified by Qlogic (Cavium)
Signed-off-by: James E.J. Bottomley
15 Mar, 2018
1 commit
-
In the comment for function alua_alloc_pg() the argument '@h' is
mistakenly referred to. Fix this by replacing it with the correct
argument reference, '@tpgs', and provide a short description.Signed-off-by: John Pittman
Reviewed-by Laurence Oberman
Signed-off-by: Martin K. Petersen
13 Mar, 2018
1 commit
-
In preparation to enabling -Wvla, remove VLAs and replace them with
fixed-length arrays instead.scsi_dh_{alua,emc,rdac} use variable-length array declarations to store
command blocks, with the appropriate size as determined by
COMMAND_SIZE. This patch replaces these with fixed-sized arrays using
MAX_COMMAND_SIZE, so that the array size can be determined at compile
time.This was prompted by https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Stephen Kitt
Reviewed-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen
31 Jan, 2018
1 commit
-
Since commit 3a025e1d1c2e ("Add optional check for bad kernel-doc
comments") building with W=1 causes warnings to appear for issues in
kernel-doc headers. This patch avoids that the following warnings are
reported when building with W=1:drivers/scsi/device_handler/scsi_dh_alua.c:867: warning: No description found for parameter 'pg'
drivers/scsi/device_handler/scsi_dh_alua.c:867: warning: No description found for parameter 'sdev'
drivers/scsi/device_handler/scsi_dh_alua.c:867: warning: No description found for parameter 'qdata'
drivers/scsi/device_handler/scsi_dh_alua.c:867: warning: No description found for parameter 'force'Signed-off-by: Bart Van Assche
Cc: Christoph Hellwig
Cc: Hannes Reinecke
Cc: Johannes Thumshirn
Reviewed-by: Hannes Reinecke
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen
11 Jan, 2018
1 commit
-
For hardware only supporting active/optimized there's no point in ever
re-issuing RTPG as the only new state we can possibly read is
active/optimized. This avoid spurious errors during path failover on
such arrays.Signed-off-by: Hannes Reinecke
Reviewed-by: Bart Van Assche
Signed-off-by: Martin K. Petersen
26 Sep, 2017
1 commit
-
Rather than having each device handler implementing their own error
mapping, have the ->attach() call return a SCSI_DH_XXX error code and
implement the mapping in scsi_dh_handler_attach().Suggested-by: Christoph Hellwig
Signed-off-by: Hannes Reinecke
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen
27 Jun, 2017
1 commit
-
Since 9c58b395 ("scsi: scsi_devinfo: remove synchronous ALUA for NETAPP
devices") this code is unused.Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
Signed-off-by: Martin K. Petersen
24 May, 2017
1 commit
-
rdac_failover_get references struct rdac_controller as
ctlr->ms_sdev->handler_data->ctlr for no apparent reason. Besides being
inefficient this also introduces a null-pointer dereference as
send_mode_select() sets ctlr->ms_sdev to NULL before calling
rdac_failover_get():[ 18.432550] device-mapper: multipath service-time: version 0.3.0 loaded
[ 18.436124] BUG: unable to handle kernel NULL pointer dereference at 0000000000000790
[ 18.436129] IP: send_mode_select+0xca/0x560
[ 18.436129] PGD 0
[ 18.436130] P4D 0
[ 18.436130]
[ 18.436132] Oops: 0000 [#1] SMP
[ 18.436133] Modules linked in: dm_service_time sd_mod dm_multipath amdkfd amd_iommu_v2 radeon(+) i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm qla2xxx drm serio_raw scsi_transport_fc bnx2 i2c_core dm_mirror dm_region_hash dm_log dm_mod
[ 18.436143] CPU: 4 PID: 443 Comm: kworker/u16:2 Not tainted 4.12.0-rc1.1.el7.test.x86_64 #1
[ 18.436144] Hardware name: IBM BladeCenter LS22 -[79013SG]-/Server Blade, BIOS -[L8E164AUS-1.07]- 05/25/2011
[ 18.436145] Workqueue: kmpath_rdacd send_mode_select
[ 18.436146] task: ffff880225116a40 task.stack: ffffc90002bd8000
[ 18.436148] RIP: 0010:send_mode_select+0xca/0x560
[ 18.436148] RSP: 0018:ffffc90002bdbda8 EFLAGS: 00010246
[ 18.436149] RAX: 0000000000000000 RBX: ffffc90002bdbe08 RCX: ffff88017ef04a80
[ 18.436150] RDX: ffffc90002bdbe08 RSI: ffff88017ef04a80 RDI: ffff8802248e4388
[ 18.436151] RBP: ffffc90002bdbe48 R08: 0000000000000000 R09: ffffffff81c104c0
[ 18.436151] R10: 00000000000001ff R11: 000000000000035a R12: ffffc90002bdbdd8
[ 18.436152] R13: ffff8802248e4390 R14: ffff880225152800 R15: ffff8802248e4400
[ 18.436153] FS: 0000000000000000(0000) GS:ffff880227d00000(0000) knlGS:0000000000000000
[ 18.436154] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 18.436154] CR2: 0000000000000790 CR3: 000000042535b000 CR4: 00000000000006e0
[ 18.436155] Call Trace:
[ 18.436159] ? rdac_activate+0x14e/0x150
[ 18.436161] ? refcount_dec_and_test+0x11/0x20
[ 18.436162] ? kobject_put+0x1c/0x50
[ 18.436165] ? scsi_dh_activate+0x6f/0xd0
[ 18.436168] process_one_work+0x149/0x360
[ 18.436170] worker_thread+0x4d/0x3c0
[ 18.436172] kthread+0x109/0x140
[ 18.436173] ? rescuer_thread+0x380/0x380
[ 18.436174] ? kthread_park+0x60/0x60
[ 18.436176] ret_from_fork+0x2c/0x40
[ 18.436177] Code: 49 c7 46 20 00 00 00 00 4c 89 ef c6 07 00 0f 1f 40 00 45 31 ed c7 45 b0 05 00 00 00 44 89 6d b4 4d 89 f5 4c 8b 75 a8 49 8b 45 20 8b b0 90 07 00 00 48 8b 56 10 8b 42 10 48 8d 7a 28 85 c0 0f
[ 18.436192] RIP: send_mode_select+0xca/0x560 RSP: ffffc90002bdbda8
[ 18.436192] CR2: 0000000000000790
[ 18.436198] ---[ end trace 40f3e4dca1ffabdd ]---
[ 18.436199] Kernel panic - not syncing: Fatal exception
[ 18.436222] Kernel Offset: disabled
[-- MARK -- Thu May 18 11:45:00 2017]Fixes: 327825574132 scsi_dh_rdac: switch to scsi_execute_req_flags()
Cc: stable@vger.kernel.org
Signed-off-by: Artem Savkov
Reviewed-by: Christoph Hellwig
Signed-off-by: Martin K. Petersen
20 Mar, 2017
3 commits
-
Callers must provide a valid port group to alua_rtpg_queue(). Issue a
kernel warning if that is not the case.Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Tang Junhui
Reviewed-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen -
Callers of scsi_dh_activate(), e.g. dm-mpath, assume that this function
either returns an error code or calls the completion function. Make
alua_activate() call the completion function even if scsi_device_get()
fails.Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Tang Junhui
Cc:
Reviewed-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen -
Do not queue ALUA work nor call scsi_device_put() if the
scsi_device_get() call fails. This patch fixes the following crash:general protection fault: 0000 [#1] SMP
RIP: 0010:scsi_device_put+0xb/0x30
Call Trace:
scsi_disk_put+0x2d/0x40
sd_release+0x3d/0xb0
__blkdev_put+0x29e/0x360
blkdev_put+0x49/0x170
dm_put_table_device+0x58/0xc0 [dm_mod]
dm_put_device+0x70/0xc0 [dm_mod]
free_priority_group+0x92/0xc0 [dm_multipath]
free_multipath+0x70/0xc0 [dm_multipath]
multipath_dtr+0x19/0x20 [dm_multipath]
dm_table_destroy+0x67/0x120 [dm_mod]
dev_suspend+0xde/0x240 [dm_mod]
ctl_ioctl+0x1f5/0x520 [dm_mod]
dm_ctl_ioctl+0xe/0x20 [dm_mod]
do_vfs_ioctl+0x8f/0x700
SyS_ioctl+0x3c/0x70
entry_SYSCALL_64_fastpath+0x18/0xadFixes: commit 03197b61c5ec ("scsi_dh_alua: Use workqueue for RTPG")
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Tang Junhui
Cc:
Reviewed-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen
24 Feb, 2017
1 commit
-
And switch all callers to use scsi_execute instead.
Signed-off-by: Christoph Hellwig
Signed-off-by: Martin K. Petersen
23 Feb, 2017
1 commit
-
We accidentally return an uninitialized variable on success.
Fixes: b6ff1b14cdf4 ("[SCSI] scsi_dh: Update EMC handler")
Signed-off-by: Dan Carpenter
Reviewed-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen
28 Jan, 2017
3 commits
-
Switch to scsi_execute_req_flags() instead of using the block interface
directly. This will set REQ_QUIET and REQ_PREEMPT, but this is okay as
we're evaluating the errors anyway and should be able to send the command
even if the device is quiesced.Signed-off-by: Hannes Reinecke
Signed-off-by: Christoph Hellwig
Acked-by: Martin K. Petersen
Signed-off-by: Jens Axboe -
Switch to scsi_execute_req_flags() and scsi_get_vpd_page() instead of
open-coding it. Using scsi_execute_req_flags() will set REQ_QUIET and
REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and
should be able to send the command even if the device is quiesced.Signed-off-by: Hannes Reinecke
Signed-off-by: Christoph Hellwig
Acked-by: Martin K. Petersen
Signed-off-by: Jens Axboe -
Switch to scsi_execute_req_flags() and scsi_get_vpd_page() instead of
open-coding it. Using scsi_execute_req_flags() will set REQ_QUIET and
REQ_PREEMPT, but this is okay as we're evaluating the errors anyway and
should be able to send the command even if the device is quiesced.Signed-off-by: Hannes Reinecke
Signed-off-by: Christoph Hellwig
Acked-by: Martin K. Petersen
Signed-off-by: Jens Axboe
15 Dec, 2016
1 commit
-
Pull SCSI updates from James Bottomley:
"This update includes the usual round of major driver updates (ncr5380,
lpfc, hisi_sas, megaraid_sas, ufs, ibmvscsis, mpt3sas).There's also an assortment of minor fixes, mostly in error legs or
other not very user visible stuff. The major change is the
pci_alloc_irq_vectors replacement for the old pci_msix_.. calls; this
effectively makes IRQ mapping generic for the drivers and allows
blk_mq to use the information"* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (256 commits)
scsi: qla4xxx: switch to pci_alloc_irq_vectors
scsi: hisi_sas: support deferred probe for v2 hw
scsi: megaraid_sas: switch to pci_alloc_irq_vectors
scsi: scsi_devinfo: remove synchronous ALUA for NETAPP devices
scsi: be2iscsi: set errno on error path
scsi: be2iscsi: set errno on error path
scsi: hpsa: fallback to use legacy REPORT PHYS command
scsi: scsi_dh_alua: Fix RCU annotations
scsi: hpsa: use %phN for short hex dumps
scsi: hisi_sas: fix free'ing in probe and remove
scsi: isci: switch to pci_alloc_irq_vectors
scsi: ipr: Fix runaway IRQs when falling back from MSI to LSI
scsi: dpt_i2o: double free on error path
scsi: cxlflash: Migrate scsi command pointer to AFU command
scsi: cxlflash: Migrate IOARRIN specific routines to function pointers
scsi: cxlflash: Cleanup queuecommand()
scsi: cxlflash: Cleanup send_tmf()
scsi: cxlflash: Remove AFU command lock
scsi: cxlflash: Wait for active AFU commands to timeout upon tear down
scsi: cxlflash: Remove private command pool
...
14 Dec, 2016
1 commit
-
Pull block layer updates from Jens Axboe:
"This is the main block pull request this series. Contrary to previous
release, I've kept the core and driver changes in the same branch. We
always ended up having dependencies between the two for obvious
reasons, so makes more sense to keep them together. That said, I'll
probably try and keep more topical branches going forward, especially
for cycles that end up being as busy as this one.The major parts of this pull request is:
- Improved support for O_DIRECT on block devices, with a small
private implementation instead of using the pig that is
fs/direct-io.c. From Christoph.- Request completion tracking in a scalable fashion. This is utilized
by two components in this pull, the new hybrid polling and the
writeback queue throttling code.- Improved support for polling with O_DIRECT, adding a hybrid mode
that combines pure polling with an initial sleep. From me.- Support for automatic throttling of writeback queues on the block
side. This uses feedback from the device completion latencies to
scale the queue on the block side up or down. From me.- Support from SMR drives in the block layer and for SD. From Hannes
and Shaun.- Multi-connection support for nbd. From Josef.
- Cleanup of request and bio flags, so we have a clear split between
which are bio (or rq) private, and which ones are shared. From
Christoph.- A set of patches from Bart, that improve how we handle queue
stopping and starting in blk-mq.- Support for WRITE_ZEROES from Chaitanya.
- Lightnvm updates from Javier/Matias.
- Supoort for FC for the nvme-over-fabrics code. From James Smart.
- A bunch of fixes from a whole slew of people, too many to name
here"* 'for-4.10/block' of git://git.kernel.dk/linux-block: (182 commits)
blk-stat: fix a few cases of missing batch flushing
blk-flush: run the queue when inserting blk-mq flush
elevator: make the rqhash helpers exported
blk-mq: abstract out blk_mq_dispatch_rq_list() helper
blk-mq: add blk_mq_start_stopped_hw_queue()
block: improve handling of the magic discard payload
blk-wbt: don't throttle discard or write zeroes
nbd: use dev_err_ratelimited in io path
nbd: reset the setup task for NBD_CLEAR_SOCK
nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME
nvme-fabrics: Add target support for FC transport
nvme-fabrics: Add host support for FC transport
nvme-fabrics: Add FC transport LLDD api definitions
nvme-fabrics: Add FC transport FC-NVME definitions
nvme-fabrics: Add FC transport error codes to nvme.h
Add type 0x28 NVME type code to scsi fc headers
nvme-fabrics: patch target code in prep for FC transport support
nvme-fabrics: set sqe.command_id in core not transports
parser: add u64 number parser
nvme-rdma: align to generic ib_event logging helper
...
06 Dec, 2016
1 commit
-
This patch avoids that sparse complains about RCU pointer dereferences.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: tang.junhui
Reviewed-by: Christoph Hellwig
Signed-off-by: Martin K. Petersen
02 Nov, 2016
2 commits
-
The code at the end of alua_rtpg_work() is as follows:
scsi_device_put(sdev);
kref_put(&pg->kref, release_port_group);In other words, alua_rtpg_queue() must hold an sdev reference and a pg
reference before queueing rtpg work. If no rtpg work is queued no
additional references should be held when alua_rtpg_queue() returns. If
no rtpg work is queued, ensure that alua_rtpg_queue() only gives up the
sdev reference if that reference was obtained by the same
alua_rtpg_queue() call.Signed-off-by: Bart Van Assche
Reported-by: Tang Junhui
Cc: Hannes Reinecke
Cc: Tang Junhui
Cc:
Reviewed-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen -
Reference count of pg leaks in alua_rtpg_work() since kref_put() is not
called to decrease the reference count of pg when the condition
pg->rtpg_sdev==NULL satisfied (actually it is easy to satisfy), it would
cause memory of pg leakage.Signed-off-by: tang.junhui
Cc:
Reviewed-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen
28 Oct, 2016
1 commit
-
A lot of the REQ_* flags are only used on struct requests, and only of
use to the block layer and a few drivers that dig into struct request
internals.This patch adds a new req_flags_t rq_flags field to struct request for
them, and thus dramatically shrinks the number of common requests. It
also removes the unfortunate situation where we have to fit the fields
from the same enum into 32 bits for struct bio and 64 bits for
struct request.Signed-off-by: Christoph Hellwig
Reviewed-by: Shaun Tancheff
Signed-off-by: Jens Axboe
27 Sep, 2016
1 commit
-
buff should be freed before returning with SCSI_DH_RETRY in alua_rtpg().
Signed-off-by: tang.junhui
Signed-off-by: Martin K. Petersen
18 May, 2016
1 commit
11 May, 2016
1 commit
-
Not every device will return a useable VPD identification, but still
might support ALUA. Rather than disable ALUA support we should be
allowing the device identification to be empty and attach individual
ALUA device handler to each devices.[mkp: Fixed typo reported by Bart]
Reported-by: Paul Mackerras
Signed-off-by: Hannes Reinecke
Tested-by: Paul Mackerras
Reviewed-by: Bart Van Assche
Signed-off-by: Martin K. Petersen
01 May, 2016
1 commit
-
It's possible to use "err" without initializing it. If it happens to be
a 2 which is SCSI_DH_RETRY then that could cause a bug. Bart Van Assche
pointed out that we should probably re-initialize it for every iteration
through the retry loop.Signed-off-by: Dan Carpenter
Reviewed-by: Hannes Reinicke
Signed-off-by: Martin K. Petersen
Signed-off-by: James Bottomley
16 Apr, 2016
1 commit
-
This patch avoids that building with W=1 causes gcc to report the
following type of warning:no previous prototype for ... [-Wmissing-prototypes]
Signed-off-by: Bart Van Assche
Reviewed-by: Hannes Reinicke
Cc: Hannes Reinecke
Cc: Christoph Hellwig
Cc: Ewan Milne
Signed-off-by: Martin K. Petersen
30 Mar, 2016
1 commit
-
While retesting the SRP initiator I ran the command "rmmod mlx4_ib"
while I/O was in progress. That command triggers SCSI device removal
indirectly. Avoid that this action triggers the following deadlock:=================================
[ INFO: inconsistent lock state ]
4.6.0-rc0-dbg+ #2 Tainted: G O
---------------------------------
inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
multipathd/484 [HC0[0]:SC0[0]:HE1:SE1] takes:
(&(&pg->lock)->rlock){+.?...}, at: [] alua_bus_detach+0x52/0xa0 [scsi_dh_alua]
{IN-SOFTIRQ-W} state was registered at:
[] __lock_acquire+0x7e9/0x1ad0
[] lock_acquire+0x60/0x80
[] _raw_spin_lock_irqsave+0x3e/0x60
[] alua_rtpg_queue+0x41/0x1d0 [scsi_dh_alua]
[] alua_check+0xe1/0x220 [scsi_dh_alua]
[] alua_check_sense+0x99/0xb0 [scsi_dh_alua]
[] scsi_check_sense+0x71/0x3f0
[] scsi_decide_disposition+0x18b/0x1d0
[] scsi_softirq_done+0x52/0x140
[] blk_done_softirq+0x52/0x90
[] __do_softirq+0x10f/0x230
[] irq_exit+0xa8/0xb0
[] do_IRQ+0x65/0x110
[] ret_from_intr+0x0/0x19
[] kmem_cache_alloc+0x151/0x190
[] create_object+0x34/0x2d0
[] kmemleak_alloc_percpu+0x56/0xd0
[] pcpu_alloc+0x38d/0x660
[] __alloc_percpu_gfp+0xd/0x10
[] __percpu_counter_init+0x55/0xb0
[] blkg_alloc+0x79/0x230
[] blkcg_init_queue+0x26/0x1d0
[] blk_alloc_queue_node+0x27d/0x2e0
[] dm_create+0x20c/0x570 [dm_mod]
[] dev_create+0x56/0x2c0 [dm_mod]
[] ctl_ioctl+0x26e/0x520 [dm_mod]
[] dm_ctl_ioctl+0xe/0x20 [dm_mod]
[] do_vfs_ioctl+0x8e/0x660
[] SyS_ioctl+0x3c/0x70
[] entry_SYSCALL_64_fastpath+0x1c/0xac
irq event stamp: 4290931
hardirqs last enabled at (4290931): [ 1662.892772]
[] _raw_spin_unlock_irqrestore+0x31/0x50
hardirqs last disabled at (4290930): [] _raw_spin_lock_irqsave+0x17/0x60
softirqs last enabled at (4290774): [] __do_softirq+0x1cb/0x230
softirqs last disabled at (4289831): [] irq_exit+0xa8/0xb0other info that might help us debug this:
Possible unsafe locking scenario:CPU0
----
lock(&(&pg->lock)->rlock);
lock(&(&pg->lock)->rlock);*** DEADLOCK ***
2 locks held by multipathd/484:
#0: (&bdev->bd_mutex){+.+.+.}, at: [] __blkdev_put+0x33/0x360
#1: (sd_ref_mutex){+.+...}, at: [] scsi_disk_put+0x1c/0x40stack backtrace:
CPU: 6 PID: 484 Comm: multipathd Tainted: G O 4.6.0-rc0-dbg+ #2
Call Trace:
[] dump_stack+0x67/0x92
[] print_usage_bug+0x215/0x240
[] mark_lock+0x54a/0x610
[] __lock_acquire+0x845/0x1ad0
[] lock_acquire+0x60/0x80
[] _raw_spin_lock+0x33/0x50
[] alua_bus_detach+0x52/0xa0 [scsi_dh_alua]
[] scsi_dh_release_device+0x17/0x50
[] scsi_device_dev_release_usercontext+0x2a/0x120
[] execute_in_process_context+0x80/0x90
[] scsi_device_dev_release+0x17/0x20
[] device_release+0x2d/0x90
[] kobject_release+0x7a/0x190
[] kobject_put+0x26/0x50
[] put_device+0x12/0x20
[] scsi_device_put+0x26/0x30
[] scsi_disk_put+0x2d/0x40
[] sd_release+0x48/0xb0
[] __blkdev_put+0x29e/0x360
[] blkdev_put+0x49/0x170
[] blkdev_close+0x20/0x30
[] __fput+0xe8/0x1f0
[] ____fput+0x9/0x10
[] task_work_run+0x6e/0xa0
[] exit_to_usermode_loop+0xa9/0xb0
[] syscall_return_slowpath+0xb0/0xc0
[] entry_SYSCALL_64_fastpath+0xaa/0xacFixes: cb0a168cb6b8 (scsi_dh_alua: update 'access_state' field)
Cc: Hannes Reinecke
Signed-off-by: Bart Van Assche
Reviewed-by: Laurence Oberman
Reviewed-by: Hannes Reinicke
Reviewed-by: Christoph Hellwig
Reviewed-by: Ewan Milne
Signed-off-by: Martin K. Petersen
15 Mar, 2016
1 commit
-
The pg_updated variable is support to be set to false at the start but
it is uninitialized.Fixes: cb0a168cb6b8 ('scsi_dh_alua: update 'access_state' field')
Signed-off-by: Dan Carpenter
Reviewed-by: Hannes Reinicke
Reviewed-by: Manoj Kumar
Signed-off-by: Martin K. Petersen
06 Mar, 2016
4 commits
-
Update the 'access_state' field of the SCSI device whenever the path
state changes.Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen -
Track attached SCSI devices and update the 'access_state' whenever the
path state of the device changes.Signed-off-by: Hannes Reinecke
Reviewed-by: Christoph Hellwig
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen -
Track attached SCSI devices and update the 'access_state' field whenever
an ALUA state change has been detected.Signed-off-by: Hannes Reinecke
Reviewed-by: Bart Van Assche
Reviewed-by: Ewan Milne
Reviewed-by: Christoph Hellwig
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen -
scsi_proto.h now contains definitions for the ALUA state, so we don't
have to carry them in the device handler.Signed-off-by: Hannes Reinecke
Reviewed-by: Bart van Assche
Reviewed-by: Christoph Hellwig
Reviewed-by: Johannes Thumshirn
Signed-off-by: Martin K. Petersen
24 Feb, 2016
6 commits
-
[mkp: Fixed merge due to patches 20-22 of series being postponed]
Reviewed-by: Christoph Hellwig
Signed-off-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen -
If a device needs to be rescanned the device_handler might need
to be rechecked, too.
So add a 'rescan' callback to the device handler and call it
upon scsi_rescan_device(). The rescan callback will be invoked
from the Unit Attention handling of ASC/ASCQ 3F 03
(INQUIRY DATA HAS CHANGED).Reviewed-by: Bart Van Assche
Reviewed-by: Christoph Hellwig
Signed-off-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen -
Sending a 'REPORT TARGET PORT GROUP' command is a costly operation,
as the array has to gather information about all ports.
So instead of using RTPG to poll for a status update when a port
is in transitioning we should be sending a TEST UNIT READY, and
wait for the sense code to report success.Reviewed-by: Bart Van Assche
Reviewed-by: Ewan Milne
Reviewed-by: Christoph Hellwig
Signed-off-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen -
When we read in the target port group state we should be
updating all affected port groups, otherwise we risk
running out of sync.Reviewed-by: Bart Van Assche
Reviewed-by: Christoph Hellwig
Signed-off-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen -
When we receive a unit attention code of 'ALUA state changed'
we should recheck the state, as it might be due to an implicit
ALUA state transition. This allows us to return NEEDS_RETRY
instead of ADD_TO_MLQUEUE, allowing to terminate the retries
after a certain time.
At the same time a workqueue item might already be queued, which
should be started immediately to avoid any delays.Reviewed-by: Bart Van Assche
Reviewed-by: Christoph Hellwig
Signed-off-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen -
Add a new blacklist flag BLIST_SYNC_ALUA to instruct the
alua device handler to use synchronous command submission
for ALUA commands.Reviewed-by: Bart Van Assche
Reviewed-by: Christoph Hellwig
Signed-off-by: Hannes Reinecke
Signed-off-by: Martin K. Petersen