aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo2009-05-07 08:24:44 -0500
committerJens Axboe2009-05-11 02:50:55 -0500
commita2dec7b36364a5cc564c4d76cf16d2e7d33f5c05 (patch)
tree76dfb84ba5fa097a929ab81cf5718c6fcbc9d720 /block/blk-map.c
parent34b7d2c957199834c474c9d46739265643f4d9c7 (diff)
downloadkernel-common-a2dec7b36364a5cc564c4d76cf16d2e7d33f5c05.tar.gz
kernel-common-a2dec7b36364a5cc564c4d76cf16d2e7d33f5c05.tar.xz
kernel-common-a2dec7b36364a5cc564c4d76cf16d2e7d33f5c05.zip
block: hide request sector and data_len
Block low level drivers for some reason have been pretty good at abusing block layer API. Especially struct request's fields tend to get violated in all possible ways. Make it clear that low level drivers MUST NOT access or manipulate rq->sector and rq->data_len directly by prefixing them with double underscores. This change is also necessary to break build of out-of-tree codes which assume the previous block API where internal fields can be manipulated and rq->data_len carries residual count on completion. [ Impact: hide internal fields, block API change ] Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 694fefad34e..56082bea450 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -20,7 +20,7 @@ int blk_rq_append_bio(struct request_queue *q, struct request *rq,
20 rq->biotail->bi_next = bio; 20 rq->biotail->bi_next = bio;
21 rq->biotail = bio; 21 rq->biotail = bio;
22 22
23 rq->data_len += bio->bi_size; 23 rq->__data_len += bio->bi_size;
24 } 24 }
25 return 0; 25 return 0;
26} 26}