summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bio.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index d3d75e2904ba..93ac8216aae4 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -81,8 +81,7 @@ struct bio {
unsigned short bi_hw_segments;
unsigned int bi_size; /* residual I/O count */
- unsigned int bi_max; /* max bvl_vecs we can hold,
- used as index into pool */
+ unsigned int bi_max_vecs; /* max bvl_vecs we can hold */
struct bio_vec *bi_io_vec; /* the actual vec list */
@@ -105,6 +104,14 @@ struct bio {
#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
/*
+ * top 4 bits of bio flags indicate the pool this bio came from
+ */
+#define BIO_POOL_BITS (4)
+#define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS)
+#define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET)
+#define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET)
+
+/*
* bio bi_rw flags
*
* bit 0 -- read (not set) or write (set)