Michal Mielewczyk
16690e1eab
Enable cache detach
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Jan Musial <jan.musial@huawei.com>
2024-09-09 16:30:05 +02:00
Michal Mielewczyk
af8c75b20a
Enable cache attach
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 16:29:21 +02:00
Michal Mielewczyk
8724c29413
Disable changing cache params for detached cache
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
bb8fc64ed5
Enable adding core to detached cache instance
...
Instead of trying to access properties of potenially unavaliable cache device
use properties saved in cache priv
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
cef13315d0
Compare properties of a new cache device during cache attach
...
New cache device must have all the same properties then the previously
attached one.
Keeping cache properties in cache priv also allows to add new cores to
detached cache instance.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
e0ef8c1b8d
New error codes
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
853e8f9357
configure: refactor cas_copy_queue_limits()
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-09 15:57:35 +02:00
Michal Mielewczyk
33721e7c92
Set NOMERGES flag for cache volume
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
2024-09-09 15:57:30 +02:00
Robert Baldyga
08e9f1a323
Remove ocf_queue_get_cache()
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-09 14:48:44 +02:00
Robert Baldyga
f0727cce62
Merge pull request #1503 from mmichal10/block-standy
...
Block standby
2024-09-09 11:16:42 +02:00
Michal Prager
f1ffd7af80
Update needed RAM calculation method
...
Signed-off-by: Michal Prager <michal.prager@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-06 15:47:26 +02:00
Michal Mielewczyk
0f0ef79b89
Disable standby mode
...
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
2024-09-06 13:23:07 +02:00
Robert Baldyga
d605ab48c8
Update mngt queue creation API
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-05 16:07:37 +02:00
Robert Baldyga
20ad0478c8
rpool: Mark an entry for kmemleak outside of atomic context
...
The kmemleak_alloc() function can sleep, thus should not be called
under spinlock. This patch fixes bug occurring on debug kernel with
kmemleak enabled.
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-09-02 12:16:59 +02:00
Robert Baldyga
2bcb220a03
Fix redefined macro error
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-22 15:53:10 +02:00
Robert Baldyga
4b693a5ecd
Fix compilation on RHEL <9.x
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-07-11 15:19:11 +02:00
MohammadJavad Asadi
b4a1e9aac3
Fix compile on Rockylinux 9
...
Signed-off-by: MohammadJavad Asadi <mj.asadi72@gmail.com>
2024-06-22 13:37:54 +03:30
Robert Baldyga
b9aa65f254
Add support for Linux kernel up to 6.8
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-14 08:47:45 +02:00
Tamar Levovitz
a202d8c9f5
Add support for Linux kernel up to 6.5
...
Signed-off-by: Tamar Levovitz <tamar.levovitz@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-14 08:47:21 +02:00
Robert Baldyga
9fc5e39349
Get rid of strlcpy()
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-14 08:22:34 +02:00
Robert Baldyga
5c4b5634cb
Add missing "static" to the local functions
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-14 08:22:34 +02:00
Robert Baldyga
7dd5fa8029
Add missing headers
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-14 08:22:34 +02:00
Robert Baldyga
6aa30f05ce
Remove unused function
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-05-14 08:22:34 +02:00
Robert Baldyga
334cc31a5c
Set exp_obj rotational=0
...
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
2024-04-03 12:11:42 +02:00
Robert Baldyga
9db73b2fb6
Set gd->queue to NULL after queue cleanup
...
Otherwise put_disk() tries to access the queue which leads to
kernel panic.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-12-30 15:18:07 +01:00
Michal Mielewczyk
4753374b1b
Change CAS_BIO_MAX_VECS value
...
Previously when user tried to allocate to big bio he recieved NULL. As the
behavior was changed to `BUG()` passing out of range value is no longer legal.
Limiting the requested bio size to BIO_MAX_PAGES (on the older kernels) or to
BIO_MAX_VECS (on the newer ones) eliminates the problem as the macros represent
the max possible value.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-12-28 13:59:20 +01:00
Krzysztof Majzerowicz-Jaszcz
2eef5ce36b
Fix for using uninitialized variable in printk
...
This commit fixes the case of using unintialized variable in error
handling path after failed core addition.
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2022-11-08 11:47:23 +00:00
Krzysztof Majzerowicz-Jaszcz
f1bf2eb909
Kernel 6.0 support
...
This patch introduces kernel 6.0 support for Open CAS
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2022-10-28 09:41:43 +02:00
Robert Baldyga
cefaa3b415
Merge pull request #1380 from robertbaldyga/available-memory-check
...
Use available memory statistic when possible
2022-10-25 11:04:15 +02:00
Krzysztof Majzerowicz-Jaszcz
f0af7cb52d
Open CAS Linux kernel 5.18 support
...
This patch introduces the support for 5.18 kernel.
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2022-10-24 09:53:01 +00:00
Robert Baldyga
b00de9c940
Use available memory statistic when possible
...
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>
2022-10-12 08:12:42 +02:00
Robert Baldyga
de060d1d5b
Merge pull request #1307 from mmichal10/kmemleak
...
Integrate kmemleak into CAS
2022-10-04 10:03:37 +02:00
Robert Baldyga
64420d7ce7
Remove blkdev_can_hndl_bio() function
...
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>
2022-09-27 16:39:33 +02:00
Robert Baldyga
ec7cee7e75
Merge pull request #1352 from robertbaldyga/exp_obj-refactor
...
Refactor disk/exp_obj API
2022-09-27 10:11:57 +02:00
Michal Mielewczyk
38bef1f7fe
Integrate kmemleak into CAS
...
Kmemleak is a tool which allows to detect memory leaks in kernel. It requires
`CONFIG_DEBUG_KMEMLEAK` to be enabled during kernel compilation. Otherwise all
the kmemleak_* functions are NOPs.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-09-26 15:44:16 +02:00
Robert Baldyga
5e2c1c15cf
Merge exp obj create/activate
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-23 14:21:37 +02:00
Robert Baldyga
d0d17545eb
Move major/minor management to exported object code
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-23 14:21:37 +02:00
Robert Baldyga
61dff1f6fd
Move private field to struct cas_exp_obj
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-23 14:21:37 +02:00
Robert Baldyga
dc390adf49
Move exported object specific properties to struct cas_exp_obj
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-23 14:21:37 +02:00
Robert Baldyga
72cf855355
Move openers_lock to struct cas_exp_obj
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-23 14:21:37 +02:00
Robert Baldyga
67ed36ae0e
Remove disk kobj
...
Simplify disk life cycle.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-23 14:21:37 +02:00
Robert Baldyga
2f54aea87d
Remove exported object kobj
...
Simplify exported object lifecycle.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-23 14:21:36 +02:00
Robert Baldyga
ad783917d0
Remove one-liner helper functions
...
Those were not very helpful. Mostly made the code harder to read.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-23 14:20:47 +02:00
Robert Baldyga
1fe83b4972
Manage lifetime of exported object in top adapter
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-23 14:20:42 +02:00
Robert Baldyga
74c17d5115
Merge pull request #1351 from live4thee/fix-compile-error
...
cas_cache: fix compile error when set CAS_DEBUG_IO=1
2022-09-20 16:04:56 +02:00
Robert Baldyga
8945b482ce
Remove private parameter from cas_disk_open()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-19 15:37:58 +02:00
Robert Baldyga
6d2266f7ee
Remove cas_disk_claim()
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-19 15:37:56 +02:00
David Lee
193f2c9a3a
cas_cache: fix compile error when set CAS_DEBUG_IO=1
...
Signed-off-by: David Lee <live4thee@gmail.com>
2022-09-19 19:21:43 +08:00
Robert Baldyga
4ed64582a6
Remove cas_disk from naming in code
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-19 10:38:21 +02:00
Robert Baldyga
edc293495d
Remove cas_disk.h
...
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-09-16 15:16:28 +02:00