Prevent loading the kernel module if the kernel can be involuntarily
preempted
CAS will work if the kernel has been compiled with either
CONFIG_PREEMPT_NONE, CONFIG_PREEMPT_VOLUNTARY, or CONFIG_PREEMPT_DYNAMIC.
If the dynamic configuration is enabled, the kernel must be booted with
preempt=none or preempt=voluntary.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
Signed-off-by: Jan Musial <jan.musial@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Ian Levine <ian.levine@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This is meant to be used by lvm2 to recognize which one of the stacked
devices should be used (be it backend device, or one of the bottom levels
in multi-level cache configuration).
Signed-off-by: Robert Baldyga <robert.baldyga@open-cas.com>
The feature is disable due to a possible data corruption which may occur when
attaching a new caching device. Once the problem is resolved this commit should
be reverted
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This prevents attempt to deinitialize the queue for the second time in
the start rollback
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Cache priv may be freed by concurrent stop.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
A write request with the REQ_RAHEAD flag enabled cause the nvme driver
to send a write command with access frequency value that is reserved
(at least on specification version 1.4c). NVME devices might fail this
write command with an unsupported error. So we now clear the request's
flag based on its direction.
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@huawei.com>
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>
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>
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>
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>