Tejun Heo wrote:I'm giving it another shot. When the padding / draining thing was in libata (or IDE) in that matter. The whole thing looked like this. user - blk - SCSI - libata - LLD - controller - device <---------------------><----------------------><-----> a b c a: Uses the 'true' request size and matching sg b: Requires adjusted request size and matching sg c: Don't really care about sg, but sometimes needs the true size. For anything which gets attached behind ATA and which may require padding, transfer size is also sent in the CDB as well, which not all devices honor and that's one of the reasons why size adjustment is necessary. If we move the adjustment to block layer and keep data_len == sum(sg), it looks like. user - blk - SCSI - libata - LLD - controller - device <------><-------------------------------------><-----> a b c And a, b and c stay the same. If we keep the requested size in data_len. Whole b gets inconsistent values in the middle while c gets the value it wants in data_len, so we're risking much more to keep the true size in rq->data_len when we could simply make it mean sum(sg). Before the only thing which need updating was to correctly determine the transfer size to feed to device. Now we need to audit whole b. In addition, such adjustments are made only when the driver explicitly requested it, so for all others it doesn't really matter. Thanks. -- tejun --
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| James Bottomley | Re: Announce: Linux-next (Or Andrew's dream :-)) |
| Michal Piotrowski | Re: 2.6.21-rc5-mm4 |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
| Lovich, Vitali | RE: [PATCH] Packet socket: mmapped IO: PACKET_TX_RING |
git: | |
