Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef TARGET_CORE_IBLOCK_H
0003 #define TARGET_CORE_IBLOCK_H
0004 
0005 #include <linux/atomic.h>
0006 #include <linux/refcount.h>
0007 #include <linux/blkdev.h>
0008 #include <target/target_core_base.h>
0009 
0010 #define IBLOCK_VERSION      "4.0"
0011 
0012 #define IBLOCK_MAX_CDBS     16
0013 
0014 struct iblock_req {
0015     refcount_t pending;
0016     atomic_t ib_bio_err_cnt;
0017 } ____cacheline_aligned;
0018 
0019 #define IBDF_HAS_UDEV_PATH      0x01
0020 
0021 #define IBD_PLUGF_PLUGGED       0x01
0022 
0023 struct iblock_dev_plug {
0024     struct se_dev_plug se_plug;
0025     struct blk_plug blk_plug;
0026     unsigned long flags;
0027 };
0028 
0029 struct iblock_dev {
0030     struct se_device dev;
0031     unsigned char ibd_udev_path[SE_UDEV_PATH_LEN];
0032     u32 ibd_flags;
0033     struct bio_set  ibd_bio_set;
0034     struct block_device *ibd_bd;
0035     bool ibd_readonly;
0036     struct iblock_dev_plug *ibd_plug;
0037 } ____cacheline_aligned;
0038 
0039 #endif /* TARGET_CORE_IBLOCK_H */