Bart Van Assche
2a50de2e4e
iscsi-scst: Build fix for kernels 3.6.1..3.6.10
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4646 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 08:22:05 +00:00
Vladislav Bolkhovitin
299c407697
Update for kernel 3.7
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4645 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-17 23:09:58 +00:00
Vladislav Bolkhovitin
b30651cda0
Cleanup
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4622 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-14 23:48:52 +00:00
Vladislav Bolkhovitin
a698883844
Switch to the new and preferred approach for printing kernel messages
...
From: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4558 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-10 03:01:34 +00:00
Vladislav Bolkhovitin
0b8bd29208
Single-statement macros should not use do { } while (0)
...
From: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4557 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-10 02:57:07 +00:00
Vladislav Bolkhovitin
05bff10f05
During nexus loss reservations should not be cleared + add possibility for device specific states be retained during nexus loss as well.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4546 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-04 20:32:59 +00:00
Vladislav Bolkhovitin
1a8577c59c
Update for 3.6 kernels
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4538 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-01 22:10:47 +00:00
Vladislav Bolkhovitin
96f498e9c8
Add support patch for rebuilding RHEL 6.3 kernel RPM
...
Add put_page_callback-2.6.32-279.patch (a copy of the RHEL 6.2 version
of the same patch) such that scripts/rebuild-rhel-kernel-rpm can rebuild
the RHEL 6.3 kernel RPM.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4535 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-29 22:34:58 +00:00
Vladislav Bolkhovitin
8ce28aaba2
Avoid that enabling a target too quickly triggers a crash
...
The sysfs attributes of a target can be accessed before scst_tgt.tgt_priv
has been set. Avoid that such an access triggers a crash.
Symptom:
BUG: unable to handle kernel NULL pointer dereference at 000000000000004c
IP: [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
PGD 150a4c067 PUD 13cacb067 PMD 0
Oops: 0000 [#1 ] SMP
CPU 1
Modules linked in: zfs(P) iscsi_scst(O) scst_vdisk(O) scst(O) zcommon(P) znvpair(P) zavl(P) zunicode(P) spl(O) [last unloaded: zfs]
Pid: 3974, comm: scst_uid1864 Tainted: P O 3.2.23-zfsiscsi-std-ipv6-64 #3 Supermicro X6DVA/X6DVA
RIP: 0010:[<ffffffffa1345848>] [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
RSP: 0018:ffff88015071ddc0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff880181fdaa00 RCX: ffff88012d41f380
RDX: ffff88015071c010 RSI: 0000000000000000 RDI: ffff880181fdaa00
RBP: ffff88015071ddc0 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffa134a608
R13: 0000000000000000 R14: 0000000000000129 R15: ffffffffa134a4c0
FS: 0000000000000000(0000) GS:ffff88019fc80000(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 000000000000004c CR3: 0000000151927000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process scst_uid1864 (pid: 3974, threadinfo ffff88015071c000, task ffff880194d57500)
Stack:
ffff88015071de10 ffffffffa12ee89a 00000000fffffffc 01ff88015071de98
ffff88015071de80 ffff8801932a48d8 00000000fffffffc ffff88015071de98
ffff88015071de80 ffff880194d57500 ffff88015071de30 ffffffffa12f582e
Call Trace:
[<ffffffffa12ee89a>] __scst_is_relative_target_port_id_unique+0x6a/0xc0 [scst]
[<ffffffffa12f582e>] gen_relative_target_port_id+0x6e/0xd0 [scst]
[<ffffffffa12fdb8a>] scst_tgt_enable_store_work_fn+0x3a/0xe0 [scst]
[<ffffffffa12f9397>] sysfs_work_thread_fn+0xc7/0x2e0 [scst]
[<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
[<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
[<ffffffff810b44f6>] kthread+0x96/0xa0
[<ffffffff81b8ed74>] kernel_thread_helper+0x4/0x10
[<ffffffff810b4460>] ? kthread_worker_fn+0x180/0x180
[<ffffffff81b8ed70>] ? gs_change+0xb/0xb
Code: 42 c8 74 0f 39 78 48 75 ea c9 c3 0f 1f 84 00 00 00 00 00 31 c0 c9 c3 66 66 66 2e 0f 1f 84 00 00 00 00 00 48 8b 47 48 55 48 89 e5 <0f> b6 40 4c c9 83 e0 01 c3 66 66 66 66 66 66 2e 0f 1f 84 00 00
RIP [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
RSP <ffff88015071ddc0>
CR2: 000000000000004c
---[ end trace 6311d4069703be07 ]---
Reported-by: Etienne Dechamps <e-t172@akegroup.org >
Signed-off-by: Bart Van Assche <bvanassche@acm.org > with some modifications
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-12 22:13:43 +00:00
Vladislav Bolkhovitin
e9008a5b12
Fix possible BUG_ON() on multiple forced commands release
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4513 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-11 20:38:57 +00:00
Vladislav Bolkhovitin
155cde35ae
Increase MAX_NR_QUEUED_CMNDS to better handle multu-LUs per target cases
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4496 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-28 19:26:43 +00:00
Vladislav Bolkhovitin
3861a12da5
Fix incorrect errors handling. Detected by smatch.
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4492 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 22:12:15 +00:00
Vladislav Bolkhovitin
eb4f05aafe
This patch addresses a minor stylistic issue: use the value
...
returned by mutex_lock_interruptible() instead of explicitly
assigning -EINTR to res.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4481 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 20:42:58 +00:00
Vladislav Bolkhovitin
fda632ae0b
iscsi-scst: Eliminate a cast
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4479 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 20:38:37 +00:00
Vladislav Bolkhovitin
5f662059a7
Update for 3.5 kernel
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4458 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-09 02:19:31 +00:00
Vladislav Bolkhovitin
955113f493
Sense handling improvements
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4408 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-18 21:28:57 +00:00
Vladislav Bolkhovitin
564b36903b
Update for kernel 3.4
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-24 18:56:44 +00:00
Vladislav Bolkhovitin
e1d73542b2
iSCSI-SCST: Fix a typo in an error message
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4251 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-30 19:29:47 +00:00
Vladislav Bolkhovitin
921e533528
Rename scst_alloc()/scst_free() to scst_alloc_sg()/scst_free_sg()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4247 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-28 00:25:41 +00:00
Vladislav Bolkhovitin
eb95049061
Copyrights updated + cleanups
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4216 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-18 02:26:39 +00:00
Vladislav Bolkhovitin
0dd7573989
Fix for missed mempool_destroy() in case when CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION not defined noticed by Bart Van Assche <bvanassche@acm.org>
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4208 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-13 20:28:50 +00:00
Vladislav Bolkhovitin
49c56244a1
Fix 3.3 checkpatch warnings about min()and max()
...
Fix three occurrences of the following warnings reported by the checkpatch
script included with Linux kernel version 3.3:
WARNING: min() should probably be min_t()
WARNING: max() should probably be max_t()
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4172 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-27 01:46:51 +00:00
Vladislav Bolkhovitin
90670b1c83
scst_rx_mgmt_fn_lun(): Change 3rd arg from u8 * into void *
...
This change allows to remove several casts and hence improves
source code readability.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4169 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-27 01:40:45 +00:00
Vladislav Bolkhovitin
d5ffb2234b
Cleanup mgmt parameters initialization.
...
It's better to do it via a single function.
Patch from Alexey Obitotskiy <alexeyo1@open-e.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-23 22:03:22 +00:00
Vladislav Bolkhovitin
937b2d550d
Update for kernel 3.3
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4164 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-23 21:48:11 +00:00
Vladislav Bolkhovitin
50120c37b3
scst_cmd_aborted() is a bad and ambiguous name. Rename it to scst_cmd_aborted_on_xmit() and create a new version, which truly reflects its semantic.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4143 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-24 02:24:06 +00:00
Bart Van Assche
f944799e42
iscsi-scst: Port to RHEL 5.7
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4112 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-04 16:41:21 +00:00
Vladislav Bolkhovitin
8e5eafb7c3
Forgotten tcp_zero_copy.c added
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4080 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-20 03:13:11 +00:00
Vladislav Bolkhovitin
9da517bae1
Update for kernel 3.2. Netlink part in iSCSI-SCST done by Bart Van Assche <bvanassche@acm.org>
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4077 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-18 23:48:02 +00:00
Vladislav Bolkhovitin
b31865ea69
Update of put_page_callback-2.6.32-220.patch from Patrick Zwahlen <paz@navixia.com>
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4064 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-12 03:22:09 +00:00
Vladislav Bolkhovitin
f6ba6aaf43
Patch from Richard Sharpe <realrichardsharpe@gmail.com> implementing put_page_callback patch for CentOS 6.2/RHEL 6.2
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4057 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-10 03:02:24 +00:00
Vladislav Bolkhovitin
7872837b6b
Replace list_entry((a)->next, b, c) by list_first_entry(a, b, c).
...
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3965 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-10 03:50:24 +00:00
Vladislav Bolkhovitin
69d8c2fbd7
Change __attribute__((packed)) into __packed and
...
__attribute__((aligned(x))) into __aligned(x) in kernel code since
checkpatch complains about the former.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-06 03:02:13 +00:00
Vladislav Bolkhovitin
295adebc0f
Use get/put_unaligned_be<n>(...) instead of
...
get/put_unaligned(cpu_to_be<n>(...)).
BSD-Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3941 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-01 03:28:39 +00:00
Vladislav Bolkhovitin
57193ecabc
Those patches were mistakenly generated for patch -p0. Fix it. Thanks
...
Bart Van Assche for reporting it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3926 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-11-16 19:21:30 +00:00
Vladislav Bolkhovitin
c95ef014d7
Update for kernel 3.1
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3902 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-10-27 19:11:40 +00:00
Bart Van Assche
74264389cd
scst: Add script for rebuilding RHEL / CentOS / Scientific Linux kernel RPMs
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3890 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-10-05 17:14:23 +00:00
Bart Van Assche
49147b3d8d
Change __constant_cpu_... into cpu_... since the latter is also evaluated at compile time.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3806 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-08-14 19:03:03 +00:00
Bart Van Assche
705c3754a2
Remove superfluous double quotes from around #warning messages because checkpatch 3.0 complains about these.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3789 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-29 12:58:13 +00:00
Vladislav Bolkhovitin
90aa221cbb
Update for kernels 3.0
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3775 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-27 01:13:10 +00:00
Vladislav Bolkhovitin
654cc65319
put_page_callback patch for RHEL61 implemented by Patrick Zwahlen <paz@navixia.com>
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3673 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-16 03:41:06 +00:00
Bart Van Assche
834015970b
Add iscsi-scst/kernel/patches/rhel/put_page_callback_addendum-rhel6.patch
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3656 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-04 16:20:23 +00:00
Vladislav Bolkhovitin
daa5da87af
Several wait loops in the SCST source code are similar. Move the common code
...
into a new macro called wait_event_locked().
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
+
Micro-optimize wait_event_locked(). Switch from default_wake_function() to
autoremove_wake_function() (via DEFINE_WAIT()). The result is that
wait_queue_head_t.lock is locked once instead of twice for wakeup + wait queue
removal.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3591 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-18 21:15:59 +00:00
Vladislav Bolkhovitin
2f1745eec1
Set data_out_in_data_receiving for preliminary completed commands as
...
well to prevent releasing them too early in iscsi_check_tm_data_wait_timeouts()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3546 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-06 21:04:04 +00:00
Bart Van Assche
beeef55b6f
Use __packed instead of __attribute__((packed)).
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3500 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-01 10:40:07 +00:00
Bart Van Assche
375597fedf
iSCSI-SCST: only define __packed for those kernels versions that do not have a definition for __packed.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3498 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-01 08:03:32 +00:00
Bart Van Assche
4839c8167f
iscsi-scst: get rid of two "suspect code indent for conditional statements" checkpatch complaints.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3497 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-01 07:19:12 +00:00
Bart Van Assche
c37081aed5
Move spaces in long #warning/#error lines to the end of the previous line to shut up checkpatch.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3495 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-01 06:59:40 +00:00
Bart Van Assche
b901fe2958
iSCSI-SCST builds again on RHEL 5.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3488 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-28 10:37:46 +00:00
Vladislav Bolkhovitin
b5a41deb28
Update for 2.6.39
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3462 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-20 00:52:34 +00:00