[dm-writeboost] initial import
[dm-writeboost] update from Akira
[writeboost] fix: u64 cast places wrongly

u64 cast is needed to cast sector_t to u64 that is feeded into
cpu_to_le64. In this case the output of calc_cache_alignment()

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
Merge pull request #3 from akiradeveloper/feature/fix-u64-cast

[writeboost] fix: u64 cast places wrongly
[writeboost] fix: kfree(buf) places wrongly

In format_all_segment_headers(), the buffer is freed
although the buffer is still used.

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
Merge pull request #4 from akiradeveloper/feature/fix-free-in-segment-format

[writeboost] fix: kfree(buf) places wrongly
[writeboost] modified comments of migrate_buffered_mb()

The comment is obsolete. Therefore, fix

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
[writeboost] use dm_kcopyd_copy in migrate_mb

migrate_mb should use dm_kcopyd_copy to show clearly it copies data from cache
device to the backing device.

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
[writeboost] delete submit_flush_request from migrate_mb

We don't need to make the data migrated in this function persistent
because migrate daemon will do it later and this segment will never be
reused until then.

Comments are fixed.

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
Merge pull request #5 from akiradeveloper/feature/migrate-mb-kcopyd

Feature/migrate mb kcopyd
[writeboost] add destroy_work_on_stack in dm_safe_io_internal

destroy_work_on_stack must be pair of INIT_WORK_ONSTACK

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
Merge pull request #6 from akiradeveloper/feature/fix-work-on-stack

[writeboost] add destroy_work_on_stack in dm_safe_io_internal
Merge remote-tracking branch 'joe/writeboost' into writeboost
[writeboost] returned value incorrect in format_superblock_header

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
[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 <ruby.wktk@gmail.com>
Merge pull request #7 from akiradeveloper/feature/fix-format-superblock-header

[writeboost] returned value incorrect in format_superblock_header
Merge pull request #8 from akiradeveloper/feature/add-aligned-pool

[writeboost] add sector-aligned slab pool for I/O buffer
Merge remote-tracking branch 'joe/writeboost' into writeboost
[writeboost] use vmalloc in zeroing_full_superblock

allocating with kmalloc may results in unaligned buffer.

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
[writeboost] use 1 sector mempool in format_superblock_header

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>