1. 22 10月, 2008 4 次提交
    • M
      dm crypt: remove waitqueue · 0a4a1047
      Milan Broz 提交于
      Remove waitqueue no longer needed with the async crypto interface.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      0a4a1047
    • M
      dm crypt: fix async split · 393b47ef
      Milan Broz 提交于
      When writing io, dm-crypt has to allocate a new cloned bio
      and encrypt the data into newly-allocated pages attached to this bio.
      In rare cases, because of hw restrictions (e.g. physical segment limit)
      or memory pressure, sometimes more than one cloned bio has to be used,
      each processing a different fragment of the original.
      
      Currently there is one waitqueue which waits for one fragment to finish
      and continues processing the next fragment.
      
      But when using asynchronous crypto this doesn't work, because several
      fragments may be processed asynchronously or in parallel and there is
      only one crypt context that cannot be shared between the bio fragments.
      The result may be corruption of the data contained in the encrypted bio.
      
      The patch fixes this by allocating new dm_crypt_io structs (with new
      crypto contexts) and running them independently.
      
      The fragments contains a pointer to the base dm_crypt_io struct to
      handle reference counting, so the base one is properly deallocated
      after all the fragments are finished.
      
      In a low memory situation, this only uses one additional object from the
      mempool.  If the mempool is empty, the next allocation simple waits for
      previous fragments to complete.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      393b47ef
    • M
      dm crypt: tidy sector · b635b00e
      Milan Broz 提交于
      Prepare local sector variable (offset) for later patch.
      Do not update io->sector for still-running I/O.
      
      No functional change.
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      b635b00e
    • M
      dm: remove dm header from targets · 586e80e6
      Mikulas Patocka 提交于
      Change #include "dm.h" to #include <linux/device-mapper.h> in all targets.
      Targets should not need direct access to internal DM structures.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      586e80e6
  2. 10 10月, 2008 8 次提交
  3. 21 7月, 2008 1 次提交
  4. 02 7月, 2008 1 次提交
  5. 29 3月, 2008 1 次提交
  6. 08 2月, 2008 15 次提交
  7. 21 12月, 2007 2 次提交
    • M
      dm crypt: use bio_add_page · 91e10625
      Milan Broz 提交于
      Fix possible max_phys_segments violation in cloned dm-crypt bio.
      
      In write operation dm-crypt needs to allocate new bio request
      and run crypto operation on this clone. Cloned request has always
      the same size, but number of physical segments can be increased
      and violate max_phys_segments restriction.
      
      This can lead to data corruption and serious hardware malfunction.
      This was observed when using XFS over dm-crypt and at least
      two HBA controller drivers (arcmsr, cciss) recently.
      
      Fix it by using bio_add_page() call (which tests for other
      restrictions too) instead of constructing own biovec.
      
      All versions of dm-crypt are affected by this bug.
      
      Cc: stable@kernel.org
      Cc:  dm-crypt@saout.de
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      91e10625
    • M
      dm crypt: fix write endio · adfe4770
      Milan Broz 提交于
      Fix BIO_UPTODATE test for write io.
      
      Cc: stable@kernel.org
      Cc: dm-crypt@saout.de
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      adfe4770
  8. 27 10月, 2007 1 次提交
  9. 24 10月, 2007 1 次提交
  10. 23 10月, 2007 1 次提交
  11. 20 10月, 2007 5 次提交