From: Tejun Heo Date: Wed, 15 Apr 2009 13:10:24 +0000 (+0900) Subject: block: fix SG_IO vector request data length handling X-Git-Tag: v2.6.30-rc4~65^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25636e282fe95508cae96bb27f86407aef935817;p=pandora-kernel.git 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 Signed-off-by: Jens Axboe --- Reading git-diff-tree failed