kernel-ark/drivers/target/target_core_iblock.h
Christoph Hellwig d5b4a21b3d target: increase iblock task sizes
There is no real limit for task sizes in the iblock driver given that we
can chain bios.  Increase the maximum size to UINT_MAX, and change the
code to submit bios in a smaller batch size to avoid deadlocks when
having more bios in flight than the pool supports.  Also increase the
pool size to always allow multiple tasks to be in flight.

I also had to change the task refcounting to include one reference for
the submission task, which is a standard practice in this kind of code
in Linux (e.g. XFS I/O submission).  This was wrong before, but couldn't
be hit easily.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-02-25 14:37:46 -08:00

25 lines
500 B
C

#ifndef TARGET_CORE_IBLOCK_H
#define TARGET_CORE_IBLOCK_H
#define IBLOCK_VERSION "4.0"
#define IBLOCK_MAX_CDBS 16
#define IBLOCK_LBA_SHIFT 9
struct iblock_req {
struct se_task ib_task;
atomic_t pending;
atomic_t ib_bio_err_cnt;
} ____cacheline_aligned;
#define IBDF_HAS_UDEV_PATH 0x01
struct iblock_dev {
unsigned char ibd_udev_path[SE_UDEV_PATH_LEN];
u32 ibd_flags;
struct bio_set *ibd_bio_set;
struct block_device *ibd_bd;
} ____cacheline_aligned;
#endif /* TARGET_CORE_IBLOCK_H */