Krzysztof Majzerowicz-Jaszcz
12ddca1cf3
OpenCAS Linux kernel 5.15 adaptation
...
This patch adapts OpenCAS Linux to compile and work with kernel v5.15
Commit id's from the kernel affecting OpenCAS:
commit 0e0ccdecb3cff95a350b4364e7ebbaa754d0e47d
block: remove bdget_disk
commit 9c2b9dbafc067e173db30c4fd0636392d27944e8
block: remove alloc_disk and alloc_disk_node
commit a8698707a1835be3abd12a3b28079a80999f8dee
block: move bd_mutex to struct gendisk
commit 2cece3778475abc855084d897a3cf61249798ad9
scsi: scsi_ioctl: Remove scsi_req_init()
commit 2f4731dcd0bb73379fbb9e3eb07ae7324125caef
block: remove bdput
commit 14cf1dbb55bb07427babee425fd2a8a9300737cc
block: remove bdgrab
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2022-06-09 08:49:32 +02:00
Gal Hammer
4ed8a59402
configure/bio_max_vecs: adapt to kernel 5.12
...
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>
2022-03-08 16:06:03 +02:00
Gal Hammer
1d64bc5294
configure/bd_first_part: adapt to kernel 5.12
...
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>
2022-03-07 09:44:35 +01:00
Gal Hammer
3c3cb6bdf1
configure/bio_dev: adapt to kernel 5.12
...
Signed-off-by: Gal Hammer <gal.hammer@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
2022-03-07 09:44:35 +01:00
Gal Hammer
4bb435555f
configure/bd_part_count: adapt to kernel 5.12
...
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>
2022-03-07 09:44:35 +01:00
Gal Hammer
fea5e72d8c
configure/module_mutex: adapt to kernel 5.12
...
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>
2022-03-07 09:41:59 +01:00
Robert Baldyga
46e6d92732
configure: trigger compilation error on pointer type incompatibility
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-12-29 16:45:11 +01:00
Gal Hammer
2162e945c2
configure: adapt to kernel 5.11
...
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>
2021-12-28 17:10:51 +02:00
Rafal Stefanowski
3d23b6d08f
Fix kernel __vmalloc() check
...
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>
2021-11-25 09:14:42 +01:00
Robert Baldyga
d9b8df7748
Merge pull request #978 from rafalste/license_change_contributions
...
License change to be approved by contributors
2021-11-19 16:58:44 +01:00
Rafal Stefanowski
acec05060d
Fix license
...
Change license to BSD-3-Clause
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-10-28 12:46:42 +02:00
Rafal Stefanowski
c7a0ae4af3
License change to be approved by contributors
...
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-10-27 11:54:04 +02:00
Robert Baldyga
17950e5a43
Fix API incompatibility detection in configure script
...
Convert warning about int to pointer detection into an error.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-25 14:09:06 +02:00
Jan Musial
ac00bd503a
Add config for BLK_MQ_F_BLOCKING flag
...
Signed-off-by: Jan Musial <jan.musial@intel.com>
2021-08-18 09:04:15 +02:00
Robert Baldyga
517d98a6ed
Split big IO requests
...
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>
2021-07-07 18:52:22 +02:00
Robert Baldyga
d6fa4c6d53
configure: Fix condition for bd_first_part
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-18 13:19:56 +02:00
Robert Baldyga
e5e0697da4
Add support for kernel 5.11
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
c7ac8c55f4
Remove unused configs
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
b82b338c53
Remove blk request handling path
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 18:59:08 +02:00
Robert Baldyga
7343cb55fa
Handle all io on bio handler
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-06-15 16:52:35 +02:00
Adam Rutkowski
9c08ed4b87
Set proper multiqueue flags
...
Setting BLK_MQ_F_STACKING (to indicate stacked device) and
BLK_MQ_F_BLOCKING (to indicate potentially blocking operations
like acquiring mutex or GFP_NOIO allocations).
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-04-16 22:52:18 -05:00
Kozlowski Mateusz
ab0a7e0a44
Add detection of ktime_get_real_ts64 vs getnstimeofday
...
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-03-26 13:46:09 +01:00
Rafal Stefanowski
43f43068ad
Update copyright statements (2021)
...
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-01-21 13:15:38 +01:00
Robert Baldyga
493caf2b31
configure: Fix coding style
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-01-15 10:10:41 +01:00
Robert Baldyga
ca3e1a5984
Revert "modules: use si_mem_available() when possible"
...
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>
2021-01-14 15:16:09 +01:00
Robert Baldyga
1810010093
Use default kernel export mechanism when symbol lookup is not available
...
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>
2020-12-22 11:33:38 +01:00
Robert Baldyga
0596597f61
Replace ioctl_by_bdev() with vfs_ioctl()
...
Since kernel 5.8 ioctl_by_bdev() is not available.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-12-22 11:33:38 +01:00
Robert Baldyga
c596c66063
configure: Add wrappers for default make request function
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-12-22 11:33:38 +01:00
Robert Baldyga
48c3598ef5
configure: Add bdev_disk_changed() wrapper
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-12-22 11:33:38 +01:00
Robert Baldyga
d9ea8d3e32
configure: Add blk_queue_make_request() wrapper
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-12-22 11:33:38 +01:00
Robert Baldyga
ca7f809965
configure: Add __vmalloc() wrapper
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-12-22 11:33:38 +01:00
Robert Baldyga
bbd0cb57a5
configure: Update generic_acct wrapper to kernel 5.8
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-12-22 11:33:38 +01:00
Anatol Pomozov
c04b0b6d67
Use linux/blkdev.h header for lookup_bdev()
...
Upstream commit 3f1266f1f82d7 moved lookup_bdev() to linux/blkdev.h
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
2020-11-05 15:22:46 -08:00
Anatol Pomozov
59d0492ef4
Specify modules source dir to avoid build warnings
...
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>
2020-10-29 18:36:23 -07:00
Michal Mielewczyk
8b64206570
configure: add CAS_BLK_BIDI_RQ() macro
...
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>
2020-08-25 08:46:24 -04:00
Robert Baldyga
1e25420f86
Merge pull request #404 from rafalste/copyright_update
...
Update copyright statements
2020-05-19 11:25:11 +02:00
Rafal Stefanowski
44b4020cc1
Update copyright statements
...
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-05-04 16:47:38 +02:00
Michal Rakowski
1e9b7a4262
modules: use si_mem_available() when possible
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-04-29 11:05:41 +02:00
Michal Mielewczyk
195e5c5e56
configure: Save output from test modules compilation.
...
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>
2019-10-14 08:43:45 -04:00
Michal Rakowski
0bd6fd4036
configure: use blk_mq_end_request as a default instead of non-mq variant
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-09-26 16:21:15 +02:00
Michal Rakowski
f015dea539
cas_disk: Add mandatory blk_mq_ops filed required by some kernels
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-09-10 16:28:28 +02:00
Adam Rutkowski
56f00b9cc7
Merge pull request #95 from micrakow/block_layer_return_types
...
Return values of expected type by the block layer
2019-09-10 10:46:42 +02:00
Michal Rakowski
0f2ea7ade7
configure: more deseralization & cleanup
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-09-09 16:10:31 +02:00
Michal Rakowski
a904a5bf66
Return values of expected type by the block layer
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-09-09 14:00:44 +02:00
Michal Mielewczyk
c6ff665c38
configure: bio dev accessor in separate file
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-06 06:27:05 -04:00
Michal Rakowski
583deef8f6
configure: adapt to kernel 5.1
...
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-08-26 11:52:39 +02:00
Michal Rakowski
18b879884e
configure: slightly extended compile_module config helper
...
Allow to pass many includes along with creating function.
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-08-26 11:52:39 +02:00
Robert Baldyga
ed6b5f60ee
Init SCSI request properly on newer kernels
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-08-05 11:51:17 +02:00
Michal Mielewczyk
a32b079a8a
Enable confiugure script to generate header in parallel.
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-07-15 06:23:11 -04:00
Michal Mielewczyk
9473cf9795
Enable configure script to compile test modules in parallel.
...
This patch significantly reduces time needed to prepare config file.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-07-12 03:00:18 -04:00