Use the SCST_INC_DIR variable passed by the parent Makefile such that
both the in-tree and out-of-tree builds work.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6130 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Split scst.spec.in as follows:
* Keep the directives for generating an RPM that contains binary kernel
modules in scst.spec.in. Add the kernel version number in the RPM name
to make it possible to install RPMs for different kernel versions next
to each other.
* Move the directives for generating a DKMS RPM into a new spec file. The
name of this spec file does not contain a kernel version since the DKMS
RPM is independent of the kernel version against which it has been built.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6125 d57e44dd-8a1f-0410-8b47-8ef2f437770f
There is no need for a detect() method - code that is present in such
a method can be moved to module_init(). Hence declare this method
obsolete. Leave the detect pointer member in the target template for
now for out-of-tree SCST drivers.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
with some improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6113 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that checkpatch reports the following:
WARNING: Possible unnecessary 'out of memory' message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6106 d57e44dd-8a1f-0410-8b47-8ef2f437770f
For some filesystems, e.g. tmpfs, address_space.readpage is NULL.
Disable zero-copy reading for such filesystems. See also shmem_aops
in mm/shmem.c. See also inode_init_always() and empty_aops in fs/inode.c.
This patch avoids that the following call trace is triggered:
BUG: unable to handle kernel NULL pointer dereference at (null)
Call Trace:
[<ffffffffa0547d66>] prepare_read+0x106/0x1d0 [scst_vdisk]
[<ffffffffa0547f20>] fileio_alloc_data_buf+0xf0/0x330 [scst_vdisk]
[<ffffffffa046fc9b>] scst_prepare_space+0x9b/0x6e0 [scst]
[<ffffffffa047d4d5>] scst_process_active_cmd+0x545/0x840 [scst]
[<ffffffffa047dad2>] scst_cmd_init_done+0x302/0x5d0 [scst]
[<ffffffffa0563ab2>] scst_cmd_init_stage1_done.constprop.37+0x12/0x20 [iscsi_scst]
[<ffffffffa056a9ea>] scsi_cmnd_start+0x25a/0x550 [iscsi_scst]
[<ffffffffa056b4a8>] cmnd_rx_start+0x148/0x1a0 [iscsi_scst]
[<ffffffffa056e4f8>] process_read_io+0x3b8/0x800 [iscsi_scst]
[<ffffffffa056ea07>] scst_do_job_rd+0xc7/0x220 [iscsi_scst]
[<ffffffffa056efed>] istrd+0x16d/0x2e0 [iscsi_scst]
[<ffffffff81079efd>] kthread+0xed/0x110
[<ffffffff817227fc>] ret_from_fork+0x7c/0xb0
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5988 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the static source code analysis tool 'smatch' reports
the following warning:
vdisk_unmap_range() warn: should 'blocks << cmd->dev->block_shift' be a 64 bit type?
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5987 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch does not change any behavior but micro-optimizes
vdisk_caching_pg(). Declaring the array caching_pg[] const reduces
11 bytes from the assembler code of this function.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5986 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that checkpatch v3.18 reports the following warning for these
two macros:
WARNING: Macros with flow control statements should be avoided
This patch does not change any functionality.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5985 d57e44dd-8a1f-0410-8b47-8ef2f437770f