diff options
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 2c0c09034fd2..13aba20edb2d 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -81,6 +81,8 @@ struct bio { | |||
81 | 81 | ||
82 | unsigned int bi_max_vecs; /* max bvl_vecs we can hold */ | 82 | unsigned int bi_max_vecs; /* max bvl_vecs we can hold */ |
83 | 83 | ||
84 | unsigned int bi_comp_cpu; /* completion CPU */ | ||
85 | |||
84 | struct bio_vec *bi_io_vec; /* the actual vec list */ | 86 | struct bio_vec *bi_io_vec; /* the actual vec list */ |
85 | 87 | ||
86 | bio_end_io_t *bi_end_io; | 88 | bio_end_io_t *bi_end_io; |
@@ -105,6 +107,7 @@ struct bio { | |||
105 | #define BIO_BOUNCED 5 /* bio is a bounce bio */ | 107 | #define BIO_BOUNCED 5 /* bio is a bounce bio */ |
106 | #define BIO_USER_MAPPED 6 /* contains user pages */ | 108 | #define BIO_USER_MAPPED 6 /* contains user pages */ |
107 | #define BIO_EOPNOTSUPP 7 /* not supported */ | 109 | #define BIO_EOPNOTSUPP 7 /* not supported */ |
110 | #define BIO_CPU_AFFINE 8 /* complete bio on same CPU as submitted */ | ||
108 | #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) | 111 | #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) |
109 | 112 | ||
110 | /* | 113 | /* |
@@ -343,6 +346,14 @@ extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set | |||
343 | extern unsigned int bvec_nr_vecs(unsigned short idx); | 346 | extern unsigned int bvec_nr_vecs(unsigned short idx); |
344 | 347 | ||
345 | /* | 348 | /* |
349 | * Allow queuer to specify a completion CPU for this bio | ||
350 | */ | ||
351 | static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu) | ||
352 | { | ||
353 | bio->bi_comp_cpu = cpu; | ||
354 | } | ||
355 | |||
356 | /* | ||
346 | * bio_set is used to allow other portions of the IO system to | 357 | * bio_set is used to allow other portions of the IO system to |
347 | * allocate their own private memory pools for bio and iovec structures. | 358 | * allocate their own private memory pools for bio and iovec structures. |
348 | * These memory pools in turn all allocate from the bio_slab | 359 | * These memory pools in turn all allocate from the bio_slab |