@@ -395,4 +395,14 @@ static inline void blk_create_io_poll_context(struct request_queue *q)
bio_poll_ctx_alloc(ioc);
}
+static inline unsigned int bio_get_private_data(struct bio *bio)
+{
+ return bio->bi_iter.bi_private_data;
+}
+
+static inline void bio_set_private_data(struct bio *bio, unsigned int data)
+{
+ bio->bi_iter.bi_private_data = data;
+}
+
#endif /* BLK_INTERNAL_H */
@@ -43,6 +43,14 @@ struct bvec_iter {
unsigned int bi_bvec_done; /* number of bytes completed in
current bvec */
+
+ /*
+ * There is a hole at the end of bvec_iter, add one new field to hold
+ * something which isn't related with 'bvec_iter', so that we can
+ * avoid extending bio. So far this new field is used for bio based
+ * polling, we will store returning value of submit_bio() here.
+ */
+ unsigned int bi_private_data;
};
struct bvec_iter_all {