Milan Broz e3e3027e12 Optimize o_direct read/writes.
* Pad luks header to 512 sector size. We need read/write in whole
sector anyway and space is unused (wiped in luksFormat) so there is
no need for read/seek/write exercise.

* Rework read/write blockwise to not split operation to many pieces.
thanks to Sebastian Andrzej Siewior:

  The buffer has to be aligned due to the O_DIRECT in open(). Currently a small
  blocksize buffer is allocated and everything is read in multiple reads and
  copied back to the original buffer. In my case AFEKSize gets computed to 64000
  which results in 125 reads with 512 bytes each.
  This patch changes this behavior to a single operation where the majority is
  read()/write() plus an optional fixup in case the request is not modulo block
  size.

* Use posix_memalign and check for alignment if available.
Othewise use old align functions. Add autoconf to detect posix_memalign.



git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@74 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-28 09:29:13 +00:00
2009-07-28 09:29:13 +00:00
2009-07-28 09:29:13 +00:00
2009-01-16 17:06:31 +00:00
2009-07-28 09:29:13 +00:00
2009-07-28 09:29:13 +00:00
Languages
C 74.8%
Shell 20.9%
Meson 1.7%
C++ 1.2%
M4 1%
Other 0.4%