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>
This commit is contained in:
Robert Baldyga 2022-09-27 16:36:48 +02:00
parent 3aaef69905
commit 64420d7ce7
2 changed files with 0 additions and 59 deletions

View File

@ -1,42 +0,0 @@
#!/bin/bash
#
# Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
. $(dirname $3)/conf_framework.sh
check() {
cur_name=$(basename $2)
config_file_path=$1
if compile_module $cur_name "RQF_SOFTBARRIER;" "linux/blkdev.h"
then
echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "REQ_SOFTBARRIER;" "linux/blk_types.h"
then
echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "BIO_RW_BARRIER;" "linux/fs.h"
then
echo $cur_name "3" >> $config_file_path
else
echo $cur_name "X" >> $config_file_path
fi
}
apply() {
case "$1" in
"1")
add_define "CAS_CHECK_BARRIER(bio) \\
((CAS_BIO_OP_FLAGS(bio) & RQF_SOFTBARRIER) != 0)" ;;
"2")
add_define "CAS_CHECK_BARRIER(bio) \\
((CAS_BIO_OP_FLAGS(bio) & REQ_SOFTBARRIER) != 0)" ;;
"3")
add_define "CAS_CHECK_BARRIER(bio) \\
(bio_rw_flagged((bio), BIO_RW_BARRIER))" ;;
*)
exit 1
esac
}
conf_run $@

View File

@ -30,17 +30,6 @@ static void blkdev_set_bio_data(struct blk_data *data, struct bio *bio)
#endif #endif
} }
static inline int blkdev_can_hndl_bio(struct bio *bio)
{
if (CAS_CHECK_BARRIER(bio)) {
CAS_PRINT_RL(KERN_WARNING
"special bio was sent, not supported!\n");
return -ENOTSUPP;
}
return 0;
}
void blkdev_set_exported_object_flush_fua(ocf_core_t core) void blkdev_set_exported_object_flush_fua(ocf_core_t core)
{ {
ocf_cache_t cache = ocf_core_get_cache(core); ocf_cache_t cache = ocf_core_get_cache(core);
@ -428,12 +417,6 @@ static void blkdev_handle_bio(struct bd_object *bvol, struct bio *bio)
static void blkdev_submit_bio(struct bd_object *bvol, struct bio *bio) static void blkdev_submit_bio(struct bd_object *bvol, struct bio *bio)
{ {
if (blkdev_can_hndl_bio(bio)) {
CAS_BIO_ENDIO(bio, CAS_BIO_BISIZE(bio),
CAS_ERRNO_TO_BLK_STS(-ENOTSUPP));
return;
}
if (in_interrupt()) if (in_interrupt())
blkdev_defer_bio(bvol, bio, blkdev_handle_bio); blkdev_defer_bio(bvol, bio, blkdev_handle_bio);
else else