summaryrefslogtreecommitdiffstats
path: root/block/blk-map.c
Commit message (Collapse)AuthorAgeFilesLines
* block: add request->raw_data_lenTejun Heo2008-02-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | With padding and draining moved into it, block layer now may extend requests as directed by queue parameters, so now a request has two sizes - the original request size and the extended size which matches the size of area pointed to by bios and later by sgs. The latter size is what lower layers are primarily interested in when allocating, filling up DMA tables and setting up the controller. Both padding and draining extend the data area to accomodate controller characteristics. As any controller which speaks SCSI can handle underflows, feeding larger data area is safe. So, this patch makes the primary data length field, request->data_len, indicate the size of full data area and add a separate length field, request->raw_data_len, for the unmodified request size. The latter is used to report to higher layer (userland) and where the original request size should be fed to the controller or device. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: update bio according to DMA alignment paddingTejun Heo2008-02-191-0/+17
| | | | | | | | | | | | | | | | | DMA start address and transfer size alignment for PC requests are achieved using bio_copy_user() instead of bio_map_user(). This works because bio_copy_user() always uses full pages and block DMA alignment isn't allowed to go over PAGE_SIZE. However, the implementation didn't update the last bio of the request to make this padding visible to lower layers. This patch makes blk_rq_map_user() extend the last bio such that it includes the padding area and the size of area pointed to by the request is properly aligned. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: make blk_rq_map_user() clear ->bio if it unmaps itJens Axboe2008-02-191-0/+1
| | | | | | | That way the interface is symmetric, and calling blk_rq_unmap_user() on the request wont oops. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: make core bits checkpatch compliantJens Axboe2008-02-011-6/+4Star
| | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: continue ll_rw_blk.c splitupJens Axboe2008-01-291-0/+264
Adds files for barrier handling, rq execution, io context handling, mapping data to requests, and queue settings. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>