aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-28 16:51:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-28 16:51:56 -0500
commit8d01eddf292dcd78b640418c80fb300532799cd4 (patch)
treedd7f816423463e5ad10f15af22fdbd5b75cc6184 /include/linux
parentf0f0052069989b80d2a3e50c9cd2f2a650bc1aea (diff)
parentfa0ccd837e3dddb44c7db2f128a8bb7e4eabc21a (diff)
Merge branch 'for-2.6.25' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.25' of git://git.kernel.dk/linux-2.6-block: block: implement drain buffers __bio_clone: don't calculate hw/phys segment counts block: allow queue dma_alignment of zero blktrace: Add blktrace ioctls to SCSI generic devices
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h11
-rw-r--r--include/linux/blktrace_api.h12
2 files changed, 15 insertions, 8 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index b71c3900810d..71e7a847dffc 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -356,6 +356,8 @@ struct request_queue
356 unsigned int max_segment_size; 356 unsigned int max_segment_size;
357 357
358 unsigned long seg_boundary_mask; 358 unsigned long seg_boundary_mask;
359 void *dma_drain_buffer;
360 unsigned int dma_drain_size;
359 unsigned int dma_alignment; 361 unsigned int dma_alignment;
360 362
361 struct blk_queue_tag *queue_tags; 363 struct blk_queue_tag *queue_tags;
@@ -692,6 +694,8 @@ extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short);
692extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); 694extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
693extern void blk_queue_hardsect_size(struct request_queue *, unsigned short); 695extern void blk_queue_hardsect_size(struct request_queue *, unsigned short);
694extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); 696extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b);
697extern int blk_queue_dma_drain(struct request_queue *q, void *buf,
698 unsigned int size);
695extern void blk_queue_segment_boundary(struct request_queue *, unsigned long); 699extern void blk_queue_segment_boundary(struct request_queue *, unsigned long);
696extern void blk_queue_prep_rq(struct request_queue *, prep_rq_fn *pfn); 700extern void blk_queue_prep_rq(struct request_queue *, prep_rq_fn *pfn);
697extern void blk_queue_merge_bvec(struct request_queue *, merge_bvec_fn *); 701extern void blk_queue_merge_bvec(struct request_queue *, merge_bvec_fn *);
@@ -768,12 +772,7 @@ static inline int bdev_hardsect_size(struct block_device *bdev)
768 772
769static inline int queue_dma_alignment(struct request_queue *q) 773static inline int queue_dma_alignment(struct request_queue *q)
770{ 774{
771 int retval = 511; 775 return q ? q->dma_alignment : 511;
772
773 if (q && q->dma_alignment)
774 retval = q->dma_alignment;
775
776 return retval;
777} 776}
778 777
779/* assumes size > 256 */ 778/* assumes size > 256 */
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index 7e11d23ac36a..06dadba349ac 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -148,7 +148,7 @@ extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
148extern void blk_trace_shutdown(struct request_queue *); 148extern void blk_trace_shutdown(struct request_queue *);
149extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); 149extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
150extern int do_blk_trace_setup(struct request_queue *q, 150extern int do_blk_trace_setup(struct request_queue *q,
151 struct block_device *bdev, struct blk_user_trace_setup *buts); 151 char *name, dev_t dev, struct blk_user_trace_setup *buts);
152 152
153 153
154/** 154/**
@@ -282,6 +282,11 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
282 __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r); 282 __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r);
283} 283}
284 284
285extern int blk_trace_setup(request_queue_t *q, char *name, dev_t dev,
286 char __user *arg);
287extern int blk_trace_startstop(request_queue_t *q, int start);
288extern int blk_trace_remove(request_queue_t *q);
289
285#else /* !CONFIG_BLK_DEV_IO_TRACE */ 290#else /* !CONFIG_BLK_DEV_IO_TRACE */
286#define blk_trace_ioctl(bdev, cmd, arg) (-ENOTTY) 291#define blk_trace_ioctl(bdev, cmd, arg) (-ENOTTY)
287#define blk_trace_shutdown(q) do { } while (0) 292#define blk_trace_shutdown(q) do { } while (0)
@@ -290,7 +295,10 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio,
290#define blk_add_trace_generic(q, rq, rw, what) do { } while (0) 295#define blk_add_trace_generic(q, rq, rw, what) do { } while (0)
291#define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) 296#define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0)
292#define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) 297#define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0)
293#define do_blk_trace_setup(q, bdev, buts) (-ENOTTY) 298#define do_blk_trace_setup(q, name, dev, buts) (-ENOTTY)
299#define blk_trace_setup(q, name, dev, arg) (-ENOTTY)
300#define blk_trace_startstop(q, start) (-ENOTTY)
301#define blk_trace_remove(q) (-ENOTTY)
294#endif /* CONFIG_BLK_DEV_IO_TRACE */ 302#endif /* CONFIG_BLK_DEV_IO_TRACE */
295#endif /* __KERNEL__ */ 303#endif /* __KERNEL__ */
296#endif 304#endif