diff options
author | Christoph Hellwig <hch@lst.de> | 2010-06-18 10:59:42 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:23:08 -0400 |
commit | 66ac0280197981f88774e74b60c8e5f9f07c1dba (patch) | |
tree | d093ce493146779926df88b5831805c6f9ee14e1 /include | |
parent | 082439004b31adc146e96e5f1c574dd2b57dcd93 (diff) |
block: don't allocate a payload for discard request
Allocating a fixed payload for discard requests always was a horrible hack,
and it's not coming to byte us when adding support for discard in DM/MD.
So change the code to leave the allocation of a payload to the lowlevel
driver. Unfortunately that means we'll need another hack, which allows
us to update the various block layer length fields indicating that we
have a payload. Instead of hiding this in sd.c, which we already partially
do for UNMAP support add a documented helper in the core block layer for it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 3fc0f5908619..204fbe22354d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -705,6 +705,8 @@ extern struct request *blk_make_request(struct request_queue *, struct bio *, | |||
705 | gfp_t); | 705 | gfp_t); |
706 | extern void blk_insert_request(struct request_queue *, struct request *, int, void *); | 706 | extern void blk_insert_request(struct request_queue *, struct request *, int, void *); |
707 | extern void blk_requeue_request(struct request_queue *, struct request *); | 707 | extern void blk_requeue_request(struct request_queue *, struct request *); |
708 | extern void blk_add_request_payload(struct request *rq, struct page *page, | ||
709 | unsigned int len); | ||
708 | extern int blk_rq_check_limits(struct request_queue *q, struct request *rq); | 710 | extern int blk_rq_check_limits(struct request_queue *q, struct request *rq); |
709 | extern int blk_lld_busy(struct request_queue *q); | 711 | extern int blk_lld_busy(struct request_queue *q); |
710 | extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, | 712 | extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, |