Remove CAS_FLUSH_SUPPORTED

It's defined on every single supported kernel, so there is actually no need
for this define at all.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga 2021-05-19 23:34:13 +02:00
parent b82b338c53
commit 7f89e59b1a
3 changed files with 0 additions and 28 deletions

View File

@ -832,7 +832,6 @@ out:
void cas_atomic_submit_flush(struct ocf_io *io) void cas_atomic_submit_flush(struct ocf_io *io)
{ {
#ifdef CAS_FLUSH_SUPPORTED
struct bd_object *bdobj = bd_object(ocf_io_get_volume(io)); struct bd_object *bdobj = bd_object(ocf_io_get_volume(io));
struct block_device *bdev = bdobj->btm_bd; struct block_device *bdev = bdobj->btm_bd;
struct request_queue *q = bdev_get_queue(bdev); struct request_queue *q = bdev_get_queue(bdev);
@ -885,18 +884,6 @@ void cas_atomic_submit_flush(struct ocf_io *io)
out: out:
cas_atomic_end_atom(atom, blkio->error); cas_atomic_end_atom(atom, blkio->error);
#else
/* Running operating system without support for REQ_FLUSH
* (i.e. SLES 11 SP 1) CAS cannot use flushing requests to handle
* power-fail safe Write-Back
*/
struct blkio *bdio = cas_io_to_blkio(io);
io->end(io, -EINVAL);
/* on SLES 11 SP 1 powerfail safety can only be achieved through
* disabling volatile write cache of disk itself.
*/
#endif
} }
void cas_atomic_submit_io(struct ocf_io *io) void cas_atomic_submit_io(struct ocf_io *io)

View File

@ -229,7 +229,6 @@ CAS_DECLARE_BLOCK_CALLBACK(cas_bd_io_end, struct bio *bio,
static void block_dev_submit_flush(struct ocf_io *io) static void block_dev_submit_flush(struct ocf_io *io)
{ {
#ifdef CAS_FLUSH_SUPPORTED
struct blkio *blkio = cas_io_to_blkio(io); struct blkio *blkio = cas_io_to_blkio(io);
struct bd_object *bdobj = bd_object(ocf_io_get_volume(io)); struct bd_object *bdobj = bd_object(ocf_io_get_volume(io));
struct block_device *bdev = bdobj->btm_bd; struct block_device *bdev = bdobj->btm_bd;
@ -271,18 +270,6 @@ static void block_dev_submit_flush(struct ocf_io *io)
out: out:
cas_bd_io_end(io, blkio->error); cas_bd_io_end(io, blkio->error);
#else
/* Running operating system without support for REQ_FLUSH
* (i.e. SLES 11 SP 1) CAS cannot use flushing requests to
* handle power-fail safe Write-Back
*/
io->end(io, -ENOTSUPP);
/* on SLES 11 SP 1 powerfail safety can only be achieved
* through disabling volatile write cache of disk itself.
*/
#endif
} }
void block_dev_submit_discard(struct ocf_io *io) void block_dev_submit_discard(struct ocf_io *io)

View File

@ -66,7 +66,6 @@ static inline int _blkdev_can_hndl_bio(struct bio *bio)
void _blockdev_set_exported_object_flush_fua(ocf_core_t core) void _blockdev_set_exported_object_flush_fua(ocf_core_t core)
{ {
#ifdef CAS_FLUSH_SUPPORTED
ocf_cache_t cache = ocf_core_get_cache(core); ocf_cache_t cache = ocf_core_get_cache(core);
ocf_volume_t core_vol = ocf_core_get_volume(core); ocf_volume_t core_vol = ocf_core_get_volume(core);
ocf_volume_t cache_vol = ocf_cache_get_volume(cache); ocf_volume_t cache_vol = ocf_cache_get_volume(cache);
@ -87,7 +86,6 @@ void _blockdev_set_exported_object_flush_fua(ocf_core_t core)
fua = (CAS_CHECK_QUEUE_FUA(core_q) || CAS_CHECK_QUEUE_FUA(cache_q)); fua = (CAS_CHECK_QUEUE_FUA(core_q) || CAS_CHECK_QUEUE_FUA(cache_q));
cas_set_queue_flush_fua(exp_q, flush, fua); cas_set_queue_flush_fua(exp_q, flush, fua);
#endif
} }
static void _blockdev_set_discard_properties(ocf_cache_t cache, static void _blockdev_set_discard_properties(ocf_cache_t cache,