jthornber/linux-2.6 — pull request #8 by akiradeveloper (2014-04-13 11:41:09+00:00)
Title: [writeboost] add sector-aligned slab pool for I/O buffer

I/O buffer is required to be sector-aligned.
Using kmalloc may results in badly aligned buffer which leads to "Redzone written" error.

- This commit adds slab pools for 1-sector/8-sector buffer.
- check_buffer_alignment() is added to check if the buffer is correctly
aligned.

Other buffers will be modified in later commits

Signed-off-by: Akira Hayakawa

----

Using __get_free_pages and calling dm_io with DM_IO_KMEM doesn't work. So, I added slab pool for buffers like dm-bufio

These buffers are aligned by 1 sector - meaning the starting address of the buffer is modulo of 512B - not 4096 page-aligned. I consider page-aligned is not required for correctness. Thought experiment: consider we submit I/O to the linear device that is shifted against the underlying device by 1 sector.

There are other buffers should be corrected but not included in this commit because the test runs only with modifications.