summaryrefslogtreecommitdiff
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:51:56 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:51:56 +1100
commit8d01eddf292dcd78b640418c80fb300532799cd4 (patch)
treedd7f816423463e5ad10f15af22fdbd5b75cc6184 /include/linux/blkdev.h
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/blkdev.h')
-rw-r--r--include/linux/blkdev.h11
1 files changed, 5 insertions, 6 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
unsigned int max_segment_size;
unsigned long seg_boundary_mask;
+ void *dma_drain_buffer;
+ unsigned int dma_drain_size;
unsigned int dma_alignment;
struct blk_queue_tag *queue_tags;
@@ -692,6 +694,8 @@ extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short);
extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
extern void blk_queue_hardsect_size(struct request_queue *, unsigned short);
extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b);
+extern int blk_queue_dma_drain(struct request_queue *q, void *buf,
+ unsigned int size);
extern void blk_queue_segment_boundary(struct request_queue *, unsigned long);
extern void blk_queue_prep_rq(struct request_queue *, prep_rq_fn *pfn);
extern 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)
static inline int queue_dma_alignment(struct request_queue *q)
{
- int retval = 511;
-
- if (q && q->dma_alignment)
- retval = q->dma_alignment;
-
- return retval;
+ return q ? q->dma_alignment : 511;
}
/* assumes size > 256 */