Merge pull request #1364 from robertbaldyga/remove-blkdev_can_hndl_bio
Remove blkdev_can_hndl_bio() function
This commit is contained in:
commit
5069652fb4
@ -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 $@
|
@ -30,17 +30,6 @@ static void blkdev_set_bio_data(struct blk_data *data, struct bio *bio)
|
||||
#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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (blkdev_can_hndl_bio(bio)) {
|
||||
CAS_BIO_ENDIO(bio, CAS_BIO_BISIZE(bio),
|
||||
CAS_ERRNO_TO_BLK_STS(-ENOTSUPP));
|
||||
return;
|
||||
}
|
||||
|
||||
if (in_interrupt())
|
||||
blkdev_defer_bio(bvol, bio, blkdev_handle_bio);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user