From: Mikulas Patocka Date: Fri, 12 Oct 2012 20:02:15 +0000 (+0100) Subject: dm: store dm_target_io in bio front_pad X-Git-Tag: v3.7-rc1~21^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dba141601d1327146c84b575bd581ea8730e901c;p=pandora-kernel.git dm: store dm_target_io in bio front_pad Use the recently-added bio front_pad field to allocate struct dm_target_io. Prior to this patch, dm_target_io was allocated from a mempool. For each dm_target_io, there is exactly one bio allocated from a bioset. This patch merges these two allocations into one allocation: we create a bioset with front_pad equal to the size of dm_target_io so that every bio allocated from the bioset has sizeof(struct dm_target_io) bytes before it. We allocate a bio and use the bytes before the bio as dm_target_io. _tio_cache is removed and the tio_pool mempool is now only used for request-based devices. This idea was introduced by Kent Overstreet. Signed-off-by: Mikulas Patocka Cc: Kent Overstreet Cc: Jens Axboe Cc: tj@kernel.org Cc: Vivek Goyal Cc: Bill Pemberton Signed-off-by: Alasdair G Kergon --- Reading git-diff-tree failed