diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 08:51:56 +1100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 08:51:56 +1100 |
commit | 8d01eddf292dcd78b640418c80fb300532799cd4 (patch) | |
tree | dd7f816423463e5ad10f15af22fdbd5b75cc6184 /include | |
parent | f0f0052069989b80d2a3e50c9cd2f2a650bc1aea (diff) | |
parent | fa0ccd837e3dddb44c7db2f128a8bb7e4eabc21a (diff) | |
download | linux-8d01eddf292dcd78b640418c80fb300532799cd4.tar.bz2 |
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')
-rw-r--r-- | include/linux/blkdev.h | 11 | ||||
-rw-r--r-- | include/linux/blktrace_api.h | 12 |
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 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 */ 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 *); extern void blk_trace_shutdown(struct request_queue *); extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); extern int do_blk_trace_setup(struct request_queue *q, - struct block_device *bdev, struct blk_user_trace_setup *buts); + char *name, dev_t dev, struct blk_user_trace_setup *buts); /** @@ -282,6 +282,11 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio, __blk_add_trace(bt, from, bio->bi_size, bio->bi_rw, BLK_TA_REMAP, !bio_flagged(bio, BIO_UPTODATE), sizeof(r), &r); } +extern int blk_trace_setup(request_queue_t *q, char *name, dev_t dev, + char __user *arg); +extern int blk_trace_startstop(request_queue_t *q, int start); +extern int blk_trace_remove(request_queue_t *q); + #else /* !CONFIG_BLK_DEV_IO_TRACE */ #define blk_trace_ioctl(bdev, cmd, arg) (-ENOTTY) #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, #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) #define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) #define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) -#define do_blk_trace_setup(q, bdev, buts) (-ENOTTY) +#define do_blk_trace_setup(q, name, dev, buts) (-ENOTTY) +#define blk_trace_setup(q, name, dev, arg) (-ENOTTY) +#define blk_trace_startstop(q, start) (-ENOTTY) +#define blk_trace_remove(q) (-ENOTTY) #endif /* CONFIG_BLK_DEV_IO_TRACE */ #endif /* __KERNEL__ */ #endif |