Commit Graph
5648 Commits
Author SHA1 Message Date
Vladislav Bolkhovitin c65a4462dc Improving thin provisioning support according to recent SBC updates
As the result, Windows 2012 started considered SCST devices thin provisioned

Reported and tested by Sergey Tashkinov <sergeyt1@open-e.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5071 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-12 06:01:14 +00:00
Bart Van Assche ca750d6383 scstadmin: Add more regression tests
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5070 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 16:40:02 +00:00
Bart Van Assche a02cf2379d scstadmin, SCST.pm, targets(): Return target names sorted alphabetically
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5069 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 16:33:05 +00:00
Bart Van Assche dad81d3ba5 scstadmin: Add a regression test infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5068 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:37:16 +00:00
Bart Van Assche 0298c2ecc3 scstadmin, SCST.pm: Fix checkTargetDynamicAttributes() return code
If no attributes have been passed to this function via the second argument,
only report success if the driver (first argument) exists.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5067 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:36:40 +00:00
Bart Van Assche 5ea0cf813f scstadmin, SCST.pm: Make argument checking more strict
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5066 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:30:31 +00:00
Bart Van Assche 00a6eeafe7 scstadmin: Add command-line option -cont_on_err
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5065 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:28:05 +00:00
Bart Van Assche 4b63daed53 scstadmin, SCST.pm: Fix checkDriverDynamicAttributes() return code
If no attributes have been passed to this function via the second argument,
only report success if the driver (first argument) exists.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5064 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:14:11 +00:00
Bart Van Assche 9e77adb8b8 scstadmin, SCST.pm: Fix setLunAttribute() error return code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5063 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:10:58 +00:00
Bart Van Assche bf82499635 scstadmin, SCST.pm: Fix lunExists() return code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5062 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:09:59 +00:00
Bart Van Assche 960759632f scstadmin, SCST.pm: Avoid triggering runtime warnings about strings having the value "undef"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5061 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:08:38 +00:00
Bart Van Assche 70a9baa58a scstadmin, SCST.pm: Check the number of arguments passed to subroutines
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5060 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:07:47 +00:00
Bart Van Assche 5fc9261fc8 scstadmin, SCST.pm: Remove dead code
_syswrite() either returns a positive number or undef but never -1.
Hence remove code that would only be executed if _syswrite() would
have returned -1.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5059 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:04:59 +00:00
Bart Van Assche 2a93823408 scstadmin: Fix Perl syntax
The Perl operator for comparing strings is "eq" and not "=".


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5058 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:04:16 +00:00
Bart Van Assche 117304c1a7 scstadmin: Fix a typo in a diagnostic message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5057 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:03:05 +00:00
Bart Van Assche 140c5af41c scstadmin: Set hardware target attributes correctly
For target drivers that support creating targets, e.g. the Emulex
FC driver, it is possible that a target attribute is both writable
for existing (hardware) targets and that it has to be specified
when creating a (virtual) target. Make sure that scstadmin sets
these attributes for existing (hardware) targets when restoring a
configuration.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5056 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 15:02:25 +00:00
Bart Van Assche 813a97afc3 scstadmin: Add infrastructure for building an RPM
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5055 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 14:32:40 +00:00
Bart Van Assche cdf784a6ad ib_srpt: Simplify the code for waking up the srpt thread after login
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5054 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 12:53:59 +00:00
Vladislav Bolkhovitin 404b21b5f0 iscsi-scst, scst_local: Avoid that session reassignment triggers a crash
This patch fixes the following crash triggered by session reassignment when using a
target driver that defines a report_aen callback in its target template (iscsi-scst
and scst_local):

BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0
IP: [<ffffffffa0299e1f>] scst_alloc_aen+0xbf/0x220 [scst]
RIP: 0010:[<ffffffffa0299e1f>]  [<ffffffffa0299e1f>] scst_alloc_aen+0xbf/0x220 [scst]
Call Trace:
 [<ffffffffa02a0aef>] scst_gen_aen_or_ua+0xff/0x2d0 [scst]
 [<ffffffffa02c3661>] scst_tg_change_tgt_dev_state+0x61/0xd0 [scst]
 [<ffffffffa02c428b>] scst_tg_init_tgt_dev+0x5b/0xa0 [scst]
 [<ffffffffa029c246>] scst_alloc_add_tgt_dev+0x686/0x750 [scst]
 [<ffffffffa02a2b57>] scst_check_reassign_sess+0x367/0x660 [scst]
 [<ffffffffa02a2ed8>] scst_check_reassign_sessions+0x88/0x140 [scst]
 [<ffffffffa02a323a>] scst_acg_add_acn+0x1ba/0x2b0 [scst]
 [<ffffffffa02a9fcf>] scst_process_acg_ini_mgmt_store+0x43f/0x570 [scst]
 [<ffffffffa02aa11e>] scst_acg_ini_mgmt_store_work_fn+0x1e/0x20 [scst]
 [<ffffffffa02b051f>] scst_process_sysfs_works+0xbf/0x190 [scst]
 [<ffffffffa02b07a0>] sysfs_work_thread_fn+0x110/0x2a0 [scst]
 [<ffffffff81069ea6>] kthread+0xd6/0xe0
 [<ffffffff814debfc>] ret_from_fork+0x7c/0xb0

Signed-off-by: Bart Van Assche <bvanassche@acm.org>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5053 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 04:02:46 +00:00
Vladislav Bolkhovitin c66294d36f Avoid that unloading SCST hangs when using bcache
Although it seems to be bcache problem, remove the
flush_scheduled_work() call because it is not necessary. Call
cancel_delayed_work_sync() after unregistration from sysfs just in case
a sysfs attribute would ever be added that allows to trigger pool
purging directly.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5052 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-10 03:17:57 +00:00
Bart Van Assche 5930dac028 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5049 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-06 09:01:13 +00:00
Vladislav Bolkhovitin 2e6c29d904 Add FORMAT MEDIUM tape command to scst_scsi_op_table
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5022 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-04 23:58:16 +00:00
Vladislav Bolkhovitin 7fd3d9da4e Relax this FW overload message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5021 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-04 04:52:26 +00:00
Vladislav Bolkhovitin 7502f47dad Fix small possible race in sessions management
In q2t_del_sess_work_fn() session can get ready to be destroyed before
hardware_lock is taken

From Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5020 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-04 02:17:43 +00:00
Vladislav Bolkhovitin b96ab2a8bf iscsi-scst: Fix a race condition triggered by logout
This patch fixes the following crash:

general protection fault: 0000 [#1] PREEMPT SMP
Modules linked in: scst_local(O) iscsi_scst(O) scst_vdisk(O) libcrc32c scst(O) brd netconsole target_core_mod configfs fcoe libfcoe libfc scsi_transport_fc scsi_tgt ib_iser rdma_cm ib_addr iw_cm ib_cm ib_sa ib_mad ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi aesni_intel aes_x86_64 glue_he
lper parport_pc ppdev lrw gf128mul ablk_helper cryptd joydev microcode mperf psmouse i2c_piix4 processor button intel_agp intel_gtt agpgart lp parport hid_generic usbhid hid ext4 jbd2 mbcache floppy ata_piix
CPU: 0 PID: 7735 Comm: iscsiwr3 Tainted: G           O 3.11.0-debug+ #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
task: ffff88000850cfc0 ti: ffff88002ea5c000 task.ti: ffff88002ea5c000
RIP: 0010:[<ffffffffa038dd7b>]  [<ffffffffa038dd7b>] target_del_all_sess+0x9b/0x180 [iscsi_scst]
RSP: 0018:ffff88002ea5dcc0  EFLAGS: 00010286
RAX: 00000000fffffffe RBX: dead0000000fefc0 RCX: 0000000000000001
RDX: ffff88000e609460 RSI: 001e00004f011780 RDI: ffff88000e609460
RBP: ffff88002ea5dce8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88000e6093b0
R13: ffff88000e609460 R14: 0000000000000000 R15: ffff88003e948158
FS:  0000000000000000(0000) GS:ffff88000f800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000427248 CR3: 0000000036d64000 CR4: 00000000000407f0
Stack:
 ffff88000e6093b0 ffff88003e85d600 ffff88003e948000 0000000000000030
 0000000000000000 ffff88002ea5dd28 ffffffffa038002b 0000000000000001
 ffff88003e55f880 ffff88002ea5dd28 ffffffffa0384d13 ffff88003e948000
Call Trace:
 [<ffffffffa038002b>] cmnd_tx_end+0x1db/0x1e0 [iscsi_scst]
 [<ffffffffa0384d13>] ? iscsi_do_send+0x23/0x60 [iscsi_scst]
 [<ffffffffa0385021>] iscsi_send+0x2d1/0x480 [iscsi_scst]
 [<ffffffff8104a802>] ? local_bh_enable_ip+0x82/0x110
 [<ffffffffa0380e8f>] ? conn_get+0x1f/0x70 [iscsi_scst]
 [<ffffffffa0385290>] scst_do_job_wr+0xc0/0x2d0 [iscsi_scst]
 [<ffffffffa038560d>] istwr+0x16d/0x2e0 [iscsi_scst]
 [<ffffffff8106a2e0>] ? wake_up_bit+0x40/0x40
 [<ffffffffa03854a0>] ? scst_do_job_wr+0x2d0/0x2d0 [iscsi_scst]
 [<ffffffff81069ea6>] kthread+0xd6/0xe0
 [<ffffffff81069dd0>] ? kthread_create_on_node+0x110/0x110
 [<ffffffff814debfc>] ret_from_fork+0x7c/0xb0
Code: 00 00 49 8b 94 24 b0 00 00 00 48 8b 1a 48 8d b2 c0 ee ff ff 48 81 eb 40 11 00 00 49 39 d5 74 28 44 89 f2 4c 89 e7 e8 15 fd ff ff <48> 8b 8b 40 11 00 00 48 89 de 48 8d 93 40 11 00 00 49 39 d5 48
[  474.156827] RIP  [<ffffffffa038dd7b>] target_del_all_sess+0x9b/0x180 [iscsi_scst]
 RSP <ffff88002ea5dcc0>

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5019 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-03 05:04:15 +00:00
Vladislav Bolkhovitin 1342a944db Fix recently discovered races in sessions management
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5018 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-03 04:24:39 +00:00
Vladislav Bolkhovitin b1d5d64a7c Add list_entry_in_list()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5017 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-03 04:24:25 +00:00
Bart Van Assche 16cd03ea1b nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5016 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-02 10:48:46 +00:00
Vladislav Bolkhovitin f27af1b46e Fix incorrect NUMBER OF LOGICAL BLOCKS handling in WRITE SAME command
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5015 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-02 05:10:56 +00:00
Vladislav Bolkhovitin 69643b4b5d Change write residual underflow handling
Now it writes only supplied amount of data.

Reported by Klaus Hochlehnert <Mailings@kh-dev.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5014 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-02 04:53:12 +00:00
Bart Van Assche c296055104 fcst: Avoid that checkpatch complains about 'struct spinlock'
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5013 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-01 06:21:38 +00:00
Bart Van Assche 2e2dfc5e36 nightly build: Add kernel 3.11
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5007 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-28 16:05:52 +00:00
Bart Van Assche dad77aead4 nightly build: Add kernel 3.11 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5006 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-28 16:04:47 +00:00
Vladislav Bolkhovitin 9f8b8ca6d0 scst_pres: Fix spelling in a debug tracing statement
Change all occurrences of "APTL" into "APTPL" (Activate Persist
Through Power Loss).

Signed-off-by: Bart Van Assche <bvanassche@acm.org>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5005 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-28 04:31:39 +00:00
Vladislav Bolkhovitin 844e194647 Update for kernels 3.11.x
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5004 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-28 04:23:45 +00:00
Vladislav Bolkhovitin 719b8be3f7 Fix incorrect logging of negotiated data digest
Reported by Klaus Hochlehnert <Mailings@kh-dev.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5003 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-28 04:04:47 +00:00
Bart Van Assche 858d02e558 [PATCH] ib_srpt: Always set RSPVALID flag in task management replies
The SRP spec requires not only to set the RSPVALID flag and the RSP_CODE
field if a task management function failed but also if it succeeded. This
patch avoids that the SRP initiator interprets task managment functions
that succeeded as failed.

Reported-by: Jack Wang <jinpu.wang@profitbricks.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-27 13:40:58 +00:00
Vladislav Bolkhovitin 9d1d74e7a8 If vfs_readv()/vfs_writev() are used, loff will be adjusted automatically
+ cleanup



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5001 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-13 09:32:35 +00:00
Vladislav Bolkhovitin 5bd3752f7e Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5000 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-13 07:29:54 +00:00
Bart Van Assche 4c2b6e8fe1 scst, implicit ALUA: Document locking strategy
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-12 10:09:58 +00:00
Vladislav Bolkhovitin e3b9d00d97 qla2x00t: Simplify q2t_create_sess()
Replace a kmalloc() and sprintf() call by a kasprintf() call. This
patch does not change any functionality.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-11 22:44:04 +00:00
Vladislav Bolkhovitin 8a03df3ed0 Improve FORMAT UNIT
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4997 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-11 02:56:47 +00:00
Bart Van Assche 7eb2b54fca nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4996 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-10 18:01:55 +00:00
Vladislav Bolkhovitin 55bfd106f0 Cosmetics
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4995 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-10 04:03:14 +00:00
Vladislav Bolkhovitin 7ac1a842e2 If supported, unmap everything on FORMAT UNIT
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4994 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-10 03:58:46 +00:00
Vladislav Bolkhovitin e913b69ef9 Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4993 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-10 03:01:41 +00:00
Bart Van Assche 47c84d3ec8 ib_srpt: Build fix for r4984
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4992 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-09 05:46:22 +00:00
Bart Van Assche 08bfd4c19a ib_srpt: Rework r4984 (skip Ethernet ports)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4991 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-08 10:20:54 +00:00
Bart Van Assche 38a6e069fa nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4990 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-08 07:03:30 +00:00
Vladislav Bolkhovitin a2ec09f24f Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4989 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-07 04:44:26 +00:00