From: David Woodhouse Date: Tue, 5 Aug 2008 17:01:53 +0000 (+0100) Subject: Add 'discard' request handling X-Git-Tag: v2.6.28-rc1~733^2~125 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb2dce862d9f9a68e6b9374579056ec9eca02a63;p=pandora-kernel.git Add 'discard' request handling Some block devices benefit from a hint that they can forget the contents of certain sectors. Add basic support for this to the block core, along with a 'blkdev_issue_discard()' helper function which issues such requests. The caller doesn't get to provide an end_io functio, since blkdev_issue_discard() will automatically split the request up into multiple bios if appropriate. Neither does the function wait for completion -- it's expected that callers won't care about when, or even _if_, the request completes. It's only a hint to the device anyway. By definition, the file system doesn't _care_ about these sectors any more. [With feedback from OGAWA Hirofumi and Jens Axboe Signed-off-by: Jens Axboe --- Reading git-diff-tree failed