Update function returning size of free memory to use available statistic
if that's supported by given kernel. This function is used to check
whether there is enough memory to start cache, and available statistic is
preferred for this check over free statistic, as it does include size of
page cache allocations which can be easily reclaimed by the system.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
In specific cases, header files will be included incorrectly
during the configuration phase, leading to erroneous failure
of affected configure step.
This patch fixes this issue.
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
This check will always return 0, as none of kernel versions supported
by Open CAS sets a barrier flag in for bio. Those flags are exclusive to
struct request, which is no longer used by Open CAS.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
In case the installed kernel doesn't have a minor version number the script
fails. Assigning default value removes this error.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Proper file extensions help 'copyright header checker' find files
that should contain copyright info. Extensions also clearly indicate
file type, and help to fit in with the file naming convention.
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
This patch fixes the problem of fs_bio_set being defined as a pointer in
kernels before 4.18, which results in build failure.
Fixes#1312
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
Rework for RHEL8.5 compatibility to avoid potential bug of exiting queue
after IO completion on a different CPU.
Targeted RHEL kernel version corrected.
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
This patch adds support for RHEL8.5 with kernel 4.18.0.348.2.1.el8 and
later.
Additional request queue operations added for these kernels.
Configure scripts added/updated.
Fixes#1278
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
Since commit 51dc893fc1 every script must take care about adding a semicolon at
the end of compilable line of code
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
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>