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>
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>
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>