This fixes issue #1224 - null pointer dereference in kernel in the IO path with large IO's issued
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
RHELs patched kernel needs additional configure.d test in order to
configure OpenCAS. This patch implements this.
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
The bio_alloc_bioset() function now BUG() if trying to allocate a bio
with more than BIO_MAX_VECS vectors.
A no-limit value (-1) is defined in order not to change old kernels'
behaviour.
Signed-off-by: Gal Hammer <gal.hammer@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
The disk's partitions table was changed to xarray.
Signed-off-by: Gal Hammer <gal.hammer@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Moved cas_blk_get_part_count function to configure section after the
the disk's partitions table was changed to xarray.
Signed-off-by: Gal Hammer <gal.hammer@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
The module_mutex is internal to the module loader since kernel
commit 922f2a7c.
Signed-off-by: Gal Hammer <gal.hammer@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
The disk_part_iter_next function is declated in linux/genhd.h header file.
Signed-off-by: Gal Hammer <gal.hammer@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Use dedicated 'pgprot_t' type instead of 'struct pgprot'
which is only defined for x86 architecture.
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
OCF cannot allocate request map bigger than 4MiB (due to kmalloc
limitations), thus we need to split bigger IOs into series smaller
ones to reduce request map size.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This method produced too optimistic free memory value, which in result
led to oom killer activation. This patch restores more conservative
free memory calculation method.
This reverts commit 1e9b7a4262.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
Since kernel 5.7 kallsyms_on_each_symbol() is not available.
NOTE: This affects ability to perform upgrade in flight on kernels 5.7+.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
If we run 'make kernelversion' in a read-only dir then it produces
mkdir: cannot create directory ‘.tmp_1056416’: Permission denied
mkdir: cannot create directory ‘.tmp_1056420’: Permission denied
mkdir: cannot create directory ‘.tmp_1056421’: Permission denied
mkdir: cannot create directory ‘.tmp_1056423’: Permission denied
warnings. To avoid it we need to specify where the source (and build)
directory located.
Closes#540
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Since commit 8b3238cabd50e27 in linux kernel removed blk_bidi_rq() marco, it
has to be wrapped in CAS `configure` script
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Currently configure script doesn't support any logging mechanism. To make easy
debugging possible, output from all failed compilation attempts is stored.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>