diff options
author | Tejun Heo <tj@kernel.org> | 2009-04-15 15:10:24 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-22 08:35:09 +0200 |
commit | 25636e282fe95508cae96bb27f86407aef935817 (patch) | |
tree | 3ab5b1ab589c02756211c8faa098f756488ff0de /block/blk-ioc.c | |
parent | scatterlist: make sure sg_miter_next() doesn't return 0 sized mappings (diff) | |
download | linux-25636e282fe95508cae96bb27f86407aef935817.tar.xz linux-25636e282fe95508cae96bb27f86407aef935817.zip |
block: fix SG_IO vector request data length handling
Impact: fix SG_IO behavior such that it matches the documentation
SG_IO howto says that if ->dxfer_len and sum of iovec disagress, the
shorter one wins. However, the current implementation returns -EINVAL
for such cases. Trim iovc if it's longer than ->dxfer_len.
This patch uses iov_*() helpers which take struct iovec * by casting
struct sg_iovec * to it. sg_iovec is always identical to iovec and
this will be further cleaned up with later patches.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-ioc.c')
0 files changed, 0 insertions, 0 deletions