File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,6 +149,25 @@ static inline void blk_queue_enter_live(struct request_queue *q)
149149 percpu_ref_get (& q -> q_usage_counter );
150150}
151151
152+ static inline bool __bvec_gap_to_prev (struct request_queue * q ,
153+ struct bio_vec * bprv , unsigned int offset )
154+ {
155+ return offset ||
156+ ((bprv -> bv_offset + bprv -> bv_len ) & queue_virt_boundary (q ));
157+ }
158+
159+ /*
160+ * Check if adding a bio_vec after bprv with offset would create a gap in
161+ * the SG list. Most drivers don't care about this, but some do.
162+ */
163+ static inline bool bvec_gap_to_prev (struct request_queue * q ,
164+ struct bio_vec * bprv , unsigned int offset )
165+ {
166+ if (!queue_virt_boundary (q ))
167+ return false;
168+ return __bvec_gap_to_prev (q , bprv , offset );
169+ }
170+
152171#ifdef CONFIG_BLK_DEV_INTEGRITY
153172void blk_flush_integrity (void );
154173bool __bio_integrity_endio (struct bio * );
Original file line number Diff line number Diff line change @@ -1676,25 +1676,6 @@ static inline void put_dev_sector(Sector p)
16761676 put_page (p .v );
16771677}
16781678
1679- static inline bool __bvec_gap_to_prev (struct request_queue * q ,
1680- struct bio_vec * bprv , unsigned int offset )
1681- {
1682- return offset ||
1683- ((bprv -> bv_offset + bprv -> bv_len ) & queue_virt_boundary (q ));
1684- }
1685-
1686- /*
1687- * Check if adding a bio_vec after bprv with offset would create a gap in
1688- * the SG list. Most drivers don't care about this, but some do.
1689- */
1690- static inline bool bvec_gap_to_prev (struct request_queue * q ,
1691- struct bio_vec * bprv , unsigned int offset )
1692- {
1693- if (!queue_virt_boundary (q ))
1694- return false;
1695- return __bvec_gap_to_prev (q , bprv , offset );
1696- }
1697-
16981679int kblockd_schedule_work (struct work_struct * work );
16991680int kblockd_schedule_work_on (int cpu , struct work_struct * work );
17001681int kblockd_mod_delayed_work_on (int cpu , struct delayed_work * dwork , unsigned long delay );
You can’t perform that action at this time.
0 commit comments