1. 13 Oct, 2012 38 commits
  2. 12 Oct, 2012 2 commits
    • Mikulas Patocka's avatar
      dm: store dm_target_io in bio front_pad · dba14160
      Mikulas Patocka authored
      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: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: Kent Overstreet <koverstreet@google.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: tj@kernel.org
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Bill Pemberton <wfp5p@viridian.itc.virginia.edu>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      dba14160
    • Mike Snitzer's avatar
      dm thin: move bio_prison code to separate module · 4f81a417
      Mike Snitzer authored
      The bio prison code will be useful to other future DM targets so
      move it to a separate module.
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
      4f81a417